Thema: Wordpress Theme Anpassung
- 02.07.2009 13:06 #1Benutzer
- Registriert seit
- 10.11.2008
- Beiträge
- 53
- Renommee-Modifikator
- 2
Wordpress Theme Anpassung Hallo,
ich verwende Arthemia (Download, Demo)
Nun möchte ich das Menü "Browse Cateories" in den Header verschieben, sodass es ständig angezeigt wird auch wenn ich einen Artikel oder eine Kategorie wähle. SOllte für jemanden der sich etwas mit PHP auskennt kein Problem sein, ich hab leider kaum Ahnung davon
originaler Code in "header.php":
<span> <span>originaler Code in "index.php":PHP-Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />
<link rel="shortcut icon" href="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/favicon.ico" />
<?php wp_head(); ?>
</head>
<body>
<div id="head" class="clearfloat">
<div class="clearfloat">
<div id="logo" class="left">
<a href="<?php echo get_option('home'); ?>/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/logo.png" width="177px" height="39px" alt="" /></a>
<div id="tagline"><?php bloginfo('description'); ?></div>
</div>
<div class="right">
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/banners/wide.jpg" alt="" width="468px" height="60px" />
</div>
</div>
<div id="navbar" class="clearfloat">
<ul id="page-bar" class="left clearfloat">
<li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
</ul>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</div>
</div>
<div id="page" class="clearfloat">
Soweit sogut, ich habe den code der Für die Darstellung des benötigten Teils herausgeschnitten:PHP-Code:<?php get_header(); ?>
<?php if(!is_paged()) { ?>
<div id="top" class="clearfloat">
<div id="headline">
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/headline.png" width="75px" height="21px" alt="" />
<?php query_posts("showposts=1&category_name=Headline"); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
<?php $values = get_post_custom_values("Headline");?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=300&h=275&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="300px" height="275px" /></a>
<?php the_excerpt(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read the full story »</a>
<?php endwhile; ?>
</div>
<div id="featured">
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="72px" height="17px" alt="" />
<?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>
<?php while (have_posts()) : the_post(); ?>
<div class="clearfloat">
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a>
<?php } ?>
<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
<div id="middle" class="clearfloat">
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" />
<?php $display_categories = array(5,6,7,8,11); $i = 1;
foreach ($display_categories as $category) { ?>
<div id="cat-<?php echo $i; ?>" class="category">
<?php query_posts("showposts=1&cat=$category")?>
<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
<a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a>
</div>
<?php $i++; ?>
<?php } ?>
</div>
<?php } ?>
<div id="bottom" class="clearfloat">
<div id="front-list">
<?php
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=-27,-28&paged=$page&posts_per_page=5"); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="clearfloat">
<h3 class=cat_title><?php the_category(', '); ?> »</h3>
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>
<div class="spoiler">
<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a>
<?php } ?>
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<div class="right"><?php next_posts_link('Next Page »') ?></div>
<div class="left"><?php previous_posts_link('« Previous Page') ?></div>
<?php } ?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
und ihn in den header eingebaut, Zeile 54.PHP-Code:<div id="middle" class="clearfloat">
<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" />
<?php $display_categories = array(5,6,7,8,11); $i = 1;
foreach ($display_categories as $category) { ?>
<div id="cat-<?php echo $i; ?>" class="category">
<?php query_posts("showposts=1&cat=$category")?>
<span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
<a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a>
</div>
<?php $i++; ?>
<?php } ?>
</div>
Alles wird richtig dargestellt, das Problem ist aber wenn ich verschiedene Kategorien wähle wir immer nur der selbe Artikel angezeigt. (die Url ändert sich aber, cat=4, cat=6...)
lg Patrick
- 09.07.2009 01:15
Benutzer
- Grund
- nicht pushen...
Aktive Benutzer
Aktive Benutzer
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Ähnliche Themen
-
A-Store in Wordpress Blog zu breit für Theme .. brauche dringend Hilfe
Von pressley im Forum HTML und XHTMLAntworten: 1Letzter Beitrag: 03.03.2009, 08:35 -
Suche Wordpress Theme Experte
Von Madayo im Forum JobbörseAntworten: 0Letzter Beitrag: 16.08.2008, 13:45 -
wordpress theme funktioniert nicht
Von Tobias im Forum Off-Topic PlaudereckeAntworten: 13Letzter Beitrag: 06.07.2008, 11:58 -
[C++]Eigenes Theme verwenden
Von gollum1990 im Forum C/C++/C#, Java, Visual BasicAntworten: 6Letzter Beitrag: 10.05.2007, 18:30 -
PostNuke Theme
Von Markus im Forum Off-Topic PlaudereckeAntworten: 0Letzter Beitrag: 04.09.2006, 13:57



LinkBack URL
About LinkBacks
Zitieren


Lesezeichen