• Hi Folk

    I would like to disable some page from being called in address bar.
    For example,
    I’m have pages name column1, column2 which their content will be feed into homepage as left and right column.

    However, if I type http://myxxxxxxcms.com/column1 it will show single content as a whole page. This may cause duplicate content and Google may confuse which page to rank. Beside, when I use some plug-in such as sitemap, everything will show up.

    Are there any possible way that I could have 404 when request some specific page but I can still use it content?
    I’m develop CMS for client, to let them just edit pages is the most simple way for non-technical user.

    Thanks you guys in advance

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

    (@esmi)

    I imagine that you could add some sort of conditional to single.php so that if one of these pages is called, it displays some sort of “nothing to see here” message.

    <?php if(is_page(array(42,66,87))) :?>
    [ nothing here message ]
    <?php else :?>
    [ normal loop ]
    <?php endif;?>

    http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

    Thread Starter Chanon Srithongsook

    (@ninenote)

    Hi Esmi

    Thanks for your wise advice. It quite helpful as I’m new to WP.
    Now I’m did what you suggested and it work good.

    However, I have to hardcode to make header 404 and modify sitemap plugin.
    I’m not sure if there are any way to overwrite wordpress function. So everytime wordpress engine query pages, it will ignore specific page id that I have identified.

    Anyway, your suggestion is work in this mean time.
    Thanks a lot mate 🙂

    Cheers.

    esmi

    (@esmi)

    It is possible to overwrite some core functions via your theme’s functions.php file. I’ve used this approach to re-write the gallery shortcode.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable some specific pages from address bar request’ is closed to new replies.