Forums

[resolved] Single posts come up with a 404 error (7 posts)

  1. jmtaylor91
    Member
    Posted 1 year ago #

    I've finished putting together the bones of my theme for my new wordpress site. The problem is when I click on a single post I get a 404 error.

    My site is here.

    Could anyone suggest what's going wrong?

    I can show my .phps and such if needed.

    Thanks in advance!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    A single post link like http://www.iamjoetaylor.co.uk/home/%EF%BF%BDhttp://www.iamjoetaylor.co.uk:/home/?p=1%EF%BF%BDtitle=%22Hello is never going to work. Are you using <?php the_permalink();?> to create the links to the single posts in index.php.

  3. jmtaylor91
    Member
    Posted 1 year ago #

    Yeah I noticed that, I knew there would be something wrong with that part of the code.

    My code at this point is: <h2><a href=”<?php the_permalink(); ?>“title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

    The tutorial I was using for my theme got a bit vague at this point and was a little unclear.

    I'm guessing there's something wrong here. Sorry for taking so long to reply by the way and thanks for the help.

  4. jmtaylor91
    Member
    Posted 1 year ago #

    Hi, can someone help with this? I'm quite stuck here.

    Thanks

  5. Chip Bennett
    Member
    Posted 1 year ago #

    Check your curly quotes here:

    href=”<?php the_permalink(); ?>“

    Replace them with the correct entity.

    Also, add a space here, between the closing quotes, and title:

    ?>“title=
  6. Chip Bennett
    Member
    Posted 1 year ago #

    p.s. if you copy-and-paste code from an online tutorial, always paste the code into a text editor first, so that things like curly quotes are removed/replaced with the correct entities.

  7. jmtaylor91
    Member
    Posted 1 year ago #

    Ahh, thankyou very much! That must have been the only bit I c+p'd.

    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic