• Resolved frenchomatic

    (@frenchomatic)


    In index.php I think there is a problem with this code or more correctly there needs to be a test for a blog posts page that is set as the posts page.

    <?php if ( is_archive() ) {
     			the_archive_title( '<h1 class="amp-wp-title">', '</h1>' );
     			the_archive_description( '<div class="taxonomy-description">', '</div>' );
     		} ?>

    As this stands the title of the blog posts page doesn’t show. In addition, clicking the link for the non-amp version goes to the home page and not the blog posts page. This however solves the first issue but not the second:

    <?php if ( is_archive() ) {
     	the_archive_title( '<h1 class="amp-wp-title">', '</h1>' );
     	the_archive_description( '<div class="taxonomy-description">', '</div>' );
     }elseif(is_home()){
    	echo '<h1 class="amp-wp-title">' . get_the_title(get_option('page_for_posts', true)) . '</h1>';
     }

    To solve the second requires modification of function function ampforwp_view_nonamp() in features.php to separate out the cases of front_page and is_home.

    I will put this on github and post some code to it.

    • This topic was modified 7 years, 7 months ago by frenchomatic.
    • This topic was modified 7 years, 7 months ago by frenchomatic.
    • This topic was modified 7 years, 7 months ago by frenchomatic.
    • This topic was modified 7 years, 7 months ago by frenchomatic.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Title of blog post page not showing’ is closed to new replies.