Hallihallo,
habe wieder ein kleines Wordpress Problem.
Und zwar habe ich 3 neue Templates erstellt um auf dieser Seite nur Artikel einer nestimmten Kategorie auszugeben. ( Habe erst später bemerkt, dass das auch einfacher geht, würde das jetzt aber gerne so lassen) Ich habe also index.php kopiert und entsprechende Zeilen geändert.
Das Problem ist jetzt, dass auf diesen 3 Seiten der Seitentitel also die H1 im Content ganz oben nicht angezeigt wird, da auf der Startseite meines Themes auch keine h1 eingepflegt ist. Würde aber gerne bei den 3 Seiten den Titel anzeigen lassen.
Hat jemand eine Idee?
Wordpress Version 4.0.1
Intarstellar UFO Theme
PHP Code des Templates ohne H1:
<?php get_header(); ?>
<?php
/*
Template Name: Programme
*/
if( 'portfolio' == get_post_type() ) {
$cat_title = __('Portfolio' ,'InterStellar');
$cat_desc = '';
} ?>
<?php
if( is_category() ) {
$cat_title = single_cat_title('',false);
$cat_desc = category_description();
} ?>
<div id="index-page" class="programmecss">
<?php if ( isset($cat_title) && $cat_title <> '') { ?>
<h1 class="title"><?php echo $cat_title; ?></h1>
<?php } ?>
<?php if ( isset($cat_desc) && $cat_desc <> '') { ?>
<span class="subheader"><?php echo $cat_desc; ?></span>
<?php } ?>
<div id="left" <?php if ( 'portfolio' == get_post_type() ) echo 'class="full-width"'; ?>>
<?php if (have_posts()) : ?>
<?php if ( 'portfolio' == get_post_type() ) { ?>
<div class="galleries">
<div class="<?php echo $options['portfolio_layout'] . '-column'; ?>">
<?php } ?>
<!-- The Loop -->
<?php query_posts('category_name=Programme'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ( 'portfolio' == get_post_type() ) { ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="gallery-image-wrap">
<?php if ( has_post_thumbnail() ) { ?>
<?php $thumbid = get_post_thumbnail_id($post->ID);
$img = wp_get_attachment_image_src($thumbid,'fullsize');
$img['title'] = get_the_title($thumbid); ?>
<?php the_post_thumbnail("gallery-thumb"); ?>
<a href="<?php echo $img[0]; ?>" class="zoom-icon" rel="shadowbox" ></a>
<a href="<?php the_permalink(); ?>" class="link-icon"></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>">
<?php echo '<img src="'.get_stylesheet_directory_uri().'/images/no-portfolio-archive.png" class="wp-post-image"/>'; ?> </a>
<?php } ?>
<?php $args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID,
'post_mime_type'=> 'image',
'orderby' => 'menu_order',
'order' => 'ASC'
);
$attachments = get_posts($args);
$count = count($attachments); ?>
<?php if ( $count > 1 ) { ?>
<span class="image-count"><?php echo $count . __(' Images', 'InterStellar'); ?></span>
<?php } ?>
</div>
<h2 class="gallery-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php } else { ?>
<?php get_template_part( 'terprocont', get_post_format() ); ?>
<?php } ?>
<?php endwhile; ?>
<?php if ( 'portfolio' == get_post_type() ) { ?>
</div>
</div> <!-- .galleries -->
<?php } ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<?php wp_pagenavi(); ?>
<?php } else { ?>
<?php get_template_part( 'navigation', 'index' ); ?>
<?php } else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</div> <!-- #left -->
<?php if ( 'portfolio' != get_post_type() ) get_sidebar(); ?>
</div> <!-- #index-page -->
<?php get_footer();?>
Alles anzeigen
Habe selbst viel rumprobiert aber nichts hat funktioniert, ich hoffe sehr dass ihr mir helfen könnt!
Vielen Dank im Vorraus und liebe Grüße
Clemens