• Hello out there. Here’s my site: https://www.dariel.com/log. I have a special header on my blog index page that goes away when you click on an individual post. I’d like the “previous posts” pages to look the same as the individual post pages. Right now, they are calling the special header from the index page rather than the plain header on the single.php page. This leads to a –gasp– broken link! I am using the Mullenweg rotate.php on the special header, so the image link is broken on the “previous posts” page. This seems like it should be easy to fix, but I can’t find anything in the forums specific enough to help. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t understand what you are trying to do. You want to add the rotate.php script to all your pages/posts not only on the index so the rotating images display on all your posts? Where is the “previous posts” pages, I don’t see any link to that on your website?

    Thread Starter dariel

    (@dariel)

    Um, well, that could work. My original idea was to use a more plain header without the rotate.php script in it. Here is a direct link to the “previous posts” page (it’s way down at the end): https://www.dariel.com/log/page/2/

    The script is trying pull off the wrong location, just add a forward slash to wp-content… like this:

    /wp-content/themes/dariel-EmptyCanvas/images/random/rotate.php

    instead of:

    wp-content/themes/dariel-EmptyCanvas/images/random/rotate.php

    That should fix it.

    Thread Starter dariel

    (@dariel)

    Nope, that just breaks my main page, which was working already. What I really need, I think, is a better way to identify the pagination, so that the correct header is called. That, or a template for the older posts page. I guess I could just make one and link to it.

    Thread Starter dariel

    (@dariel)

    Wow. I fixed it. It’s been, like, months.
    Ok. So here’s what worked:

    <?php
    if ( is_home() and !is_paged()) :
      get_header('home');
    else :
      get_header();
    endif;
    ?>

    Which is weird because it seems to say the opposite of what it does. Here’s what I had before that didn’t work:

    <?php
    if ( is_home()) :
      get_header('home');
    else :
      get_header();
    endif;
    ?>

    Strange.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Want to make a template for the "previous posts" pages’ is closed to new replies.