Support » Fixing WordPress » Can't get my post to display after clicking the get_permalink() link

  • Resolved thegh0s7


    Hey, This is my first custom wordpress theme that I am trying to create and I haven’t done all that much in PHP for a few months so I’m a bit rusty in that as well.

    The Issue I am having is that when you click on a post in the WP loop it shows the URL has changed but the loop is still there (while removing the header)

    You can see what I am talking about here:
    Just click on a post title and it will bring you to my issue. (don’t mind the broken images, its a WIP)

    Heres the query code (which I think is done correctly)

    query_posts( 'showposts=' . $bnm_number_of_posts_homepage . '&paged=' . $paged );
    query_posts( 'showposts=8&paged=' . $paged );

    and here all of the index code if you would like to take a look

    It seems to be a logic error and not a code error because the debug log doesn’t have anything in it when I activated the WordPress Debug Mode.

    I also did not find much on google about this particular issue, when I typed in what I thought it could be it led me to broken WP Loops due to multiple queries on the same page.

    I appreciate all the help that you can offer me, and if you need any more info I will gladly give it to you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael


    Forum Moderator

    does your theme have a single.php template?

    if not, wordpress will use index.php; and this has the custom query

    query_posts( 'showposts=8&paged=' . $paged );

    which changes what the loop will show.

    make a copy of index.php, and save it as single.php;
    then remove the un-needed code such as the featured slider and the lines with query_posts.

    Thank you very much, I dont have single.php, I will give that a shot.

    Perfect that fixed it, thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't get my post to display after clicking the get_permalink() link’ is closed to new replies.