• Resolved jmtaylor91

    (@jmtaylor91)


    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    Thread Starter jmtaylor91

    (@jmtaylor91)

    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.

    Thread Starter jmtaylor91

    (@jmtaylor91)

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

    Thanks

    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=

    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.

    Thread Starter jmtaylor91

    (@jmtaylor91)

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

    Thanks again

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

The topic ‘Single posts come up with a 404 error’ is closed to new replies.