WordPress.org

Forums

Can I stop WordPress from making post pages using single.php? (12 posts)

  1. g3legacy
    Member
    Posted 4 years ago #

    Hi, I recently finished a site with a small blog on the front page. The blog loops through a category and uses the_title(); and the_content(); - pretty simple stuff. I doesn't use the permalink and In no way links to a separate page about that particular entry.

    While the site was being indexed by Google I noticed over a few weeks it found a page for each of the posts in my blog, and archive pages also. As I wasn't using any of that stuff I didn't even bother styling the templates, so It was a bit of a mess!

    Does anyone know how I stop WordPress from making these pages? It also generated a cancatonal link (or something like that!) that didn't go anywhere, so that generated a 404 crawl error.

    Despite using WordPress for a while I have never tried to get round using the other templates, any advice ?

    Many thanks, Dan

  2. mheltone
    Member
    Posted 4 years ago #

    Can you post your header.php here.
    And your website URL

  3. g3legacy
    Member
    Posted 4 years ago #

    Hi, this is my header - below this there is only Javascript so I missed that out. Then its just the regular body opening tag...

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The website is here. If you do a google site: search you will see it found all sorts of other pages. I've since modified my robots.txt file to block some of the urls but there must be a better way?

  4. g3legacy
    Member
    Posted 4 years ago #

    Hi, still having problems with this and need to get it sorted as I'm launching another site soon.....anyone got any ideas? I'm assuming it's to do with wp_head(); ?

  5. g3legacy
    Member
    Posted 4 years ago #

    Still no luck with this, anyone know who I can stop these other pages being generated?

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    You can't stop them being generated but they're only generated on demand. so no links to them - no pages generated. Remove all links to single posts and archives from your remaining template files.

  7. g3legacy
    Member
    Posted 4 years ago #

    Do you know how the googlebot would find them then? I'm also getting 404's for URL's like this;

    http://www.havant-district-mencap-club.co.uk/category/Copy of twentyten/http://www.havant-district-mencap-club.co.uk/upcoming-events/next-disco/

    I have a feeling that's to do with copying the original theme?

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    Googlebot finds them because you've got links to them on your site.

  9. g3legacy
    Member
    Posted 4 years ago #

    If a link to a post isn't defined in a template, where else might it be? I run posts on that site, but the_permalink(); isn't used at all...

  10. esmi
    Forum Moderator
    Posted 4 years ago #

    I can;'t tell. We've not been given the site url yet.

  11. fonglh
    Member
    Posted 4 years ago #

    he actually gave the url in his 2nd post.

    http://www.havant-district-mencap-club.co.uk/

  12. g3legacy
    Member
    Posted 4 years ago #

    Yep, that's the one. I need to index a similar site soon, hopefully someone knows the answers :D

Topic Closed

This topic has been closed to new replies.

About this Topic