• Hello,

    I have installed WP as a CMS. On the main page it shows last 5 full-posts as a news section. I don;t want any single posts pages or permalinks.

    Is there a way to do this? – I feel like I should be able to just turn them off… but it seems not

Viewing 6 replies - 1 through 6 (of 6 total)
  • I believe for this you would need to remove the permalink reference in your index.php file.

    Example of default theme index.php file referencing the permalink:

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

    Remove the anchor:

    <h2><?php the_title(); ?></h2>

    Thread Starter thedooropens

    (@thedooropens)

    Thanks – I did that already, but I can confirm single posts are still getting indexed. At least the H2 doesnt link to them anymore!

    You mean you don’t want the single pages to show up in search engines?

    You could add the following to your robots.txt file, if you have one (or create one):

    User-Agent: *
    Disallow: /FILE-NAME-HERE
    Thread Starter thedooropens

    (@thedooropens)

    I’m not too good on the php side of things. Will disallowing the single.php file block all single posts from getting indexed? That doesn’t seem right to me!

    Sorry if I wasn’t clear. For each post, you need to disallow indexing.

    User-Agent: *
    Disallow: /your_post_file_name_here

    Perhaps someone else will come along and explain this better. I’ve never encountered this exact scenario before (i.e. not wanting single posts to show or be indexed).

    Thread Starter thedooropens

    (@thedooropens)

    Yes it seems to be hard to find a fix! Should be a button to turn them off, but I’m no programmer, maybe it’s complex. Thanks for the suggestion.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Stop Permalinks’ is closed to new replies.