• Hello,

    I’m currently modifying my WordPress installation to my needs.

    At the moment I’ve got a category that is excluded from the ‘Blog’ area of my website, but is displayed (1 post at a time) on an external page, outside of the blog.

    The external page is set up correctly to display the 1 post in the 1 category, and you can see the result here > http://photogrant.co.uk/index.php

    I’m trying to make it, so that the image will be clickable, and able to display the previous post in that category – whilst still staying within the same index.php (i.e index.php?post=2).

    I’ve tried to even just include a link that would do this

    <?php the_content(); previous_post_link('format', 'link', TRUE, 'excluded_categories'); ?>

    But this will not work. Can anyone advance the situation? I’ve been doing a lot of googling with very little in return. I really appreciate it!

    Grant

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter photogrant

    (@photogrant)

    I’m one step closer to working this out.

    I’ve realised that the loop is displaying content as a page and I’m filtering it accordingly, what I should be doing, is displaying it as a single_post.

    Putting $wp_query->is_single = true; in the header PHP has solved this issue. What it hasn’t done, however, is allow the index.php to be static, and display the previous post within itself.

    If anyone could further this, I’d appreciate it.

    Thanks,
    Grant.

    Thread Starter photogrant

    (@photogrant)

    Anyone?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Previous_Post_Link on external ‘loop’ page’ is closed to new replies.