Forum Replies Created
-
AuthorPosts
-
February 8, 2013 at 6:08 pm in reply to: MINIMUM Theme: Adding the post and page title to page-title.php #19121emkeMember
Hi,
so I have a problem I cannot figure out how to solve. On my blog page I get the last post title in my page-title area. I would like to have only "Blog" or what ever as the blog page is showing several posts and not only the last one. This is the code I currently have:
<?php
if ( is_home() ) {
echo '<div id="page-title"><div class="wrap"><h1>' . esc_html( get_the_title($ID)) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}
elseif ( is_404() ) {
echo '<div id="page-title"><div class="wrap"><h1>' . __( 'Ooops!', 'minimum' ) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}
elseif ( is_singular( 'page' ) ) {
echo '<div id="page-title"><div class="wrap"><h1>' . esc_html( get_the_title($ID)) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}
elseif ( is_singular( 'post' ) ) {
echo '<div id="page-title"><div class="wrap"><h1>' . esc_html( get_the_title($ID)) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}
elseif ( is_author() || is_category() || is_date() || is_search() || is_singular() || is_tag() ) {
echo '<div id="page-title"><div class="wrap"><h1>' . __( 'From the Blog', 'minimum' ) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}
else {
echo '<div id="page-title"><div class="wrap"><h1>' . esc_html( get_bloginfo( 'description' ) ) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}I've tried adding:
}
elseif ( is_blog() ) {
echo '<div id="page-title"><div class="wrap"><h1>' . __( 'Ooops!', 'minimum' ) . '</h1><a class="page-title-button" href="/contact">' . __( 'Contact', 'minimum' ) . '</a></div></div>';
}but then nothing works. Can anyone help me out please?
February 7, 2013 at 4:53 pm in reply to: MINIMUM Theme: Adding the post and page title to page-title.php #18774emkeMemberYeah, I also managed to get it to work in the mean time. Thanks for your help! 🙂
February 6, 2013 at 5:51 pm in reply to: MINIMUM Theme: Adding the post and page title to page-title.php #18546emkeMemberI'm actually looking for the same thing as Jones. Any pointers on what to do?
-
AuthorPosts