• Resolved Christian Rodríguez

    (@hanschristian)


    I’m making changes to my “template-blog.php” file, but it doesn’t update :-S

    I don’t have host cache, cache plugins or anything. I also can see any change I make in any part of the theme, except this template.

    This is the template I’m using for the blog posts page, and begins as this way:

    <?php
    /*
     * Template Name: Blog
     * Description: The blog post theme page
     */

    Also, when I update the name (like “Blog2” or whatever), it reflects on the page editor, but the rest of the HTML/PHP code doesn’t affect.

    I read this WordPress help, but it doesn’t talk about this bug.

    Isn’t the first time I see this bug. Some years ago, I experienced the same issue, but I don’t remember the fix. Some can help?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • What theme are you using? Also, are you trying to use this page template as the template for your blog posts, or for a different static page?

    Thread Starter Christian Rodríguez

    (@hanschristian)

    Hi! I’m using the “Editor” theme, but I’m not using the template on blog posts, just the blog page. You can see the case here:

    https://hanschristian.net/blog

    In the code, I added the following:
    <h1 class="page-title"><?php the_title(); ?></h1>
    But you can see that changes are not reflecting :-S

    Are you using a static front page? Under Settings > Reading, what are your settings for “Front page displays”? Can you post the entire code for the template in question to someplace like Pastebin and post the link here?

    Thread Starter Christian Rodríguez

    (@hanschristian)

    I’m using a static page in the homepage and blog page:

    I added the code on the lines 12/13 some hours ago (I think 6 hours ago). But is still showing the older version :-S

    Thank you so much, Stephen!

    Thread Starter Christian Rodríguez

    (@hanschristian)

    Sorry, I edited the response. Now is right (homepage uses a default template, and blog uses template-blog.php).

    Ah, I see. Unfortunately, you can’t do what I think you’re attempting to do. When you’re using a static front page, WordPress will always use a file called home.php or index.php to generate the page showing your blog posts. You should make a child theme of Editor, copy index.php to your child theme, and edit that file instead.

    Thread Starter Christian Rodríguez

    (@hanschristian)

    Oh, so WordPress doesn’t consider the template you using in a static frontpage for the blog posts? :-S

    I’ll try your option tomorrow. Thank you very much for helping, Stephen! : )

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Page template cache’ is closed to new replies.