Forums

Trying to Understand (2 posts)

  1. J_P62
    Member
    Posted 2 years ago #

    A complete WordPress newbie here, I've done some other basic web stuff and have a small business online. However ...

    I would like to transtition my sites to the WordPress platform.

    a) Can I have php code for my payment pages on WOrdpress, interface with MySQL databases etc?
    b) How do I stop the search engines indexing certain pages on my site (where I want paid-for content)?

    Can anyone help or point me at suitable resouces to answer these?

    Thanks! JP

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    a) Yes. You can have any code you like in a template file.

    b) you could set the robots meta header based on the page id or name in header.php.

    <?php if( is_page(array(42,'about-me','About Me And Joe')) $robots = 'noindex, nofollow';
    else $robots = 'index, follow';?>
    <meta name="robots" content="<?php echo $robots;?>" />

    http://codex.wordpress.org/Conditional_Tags

Topic Closed

This topic has been closed to new replies.

About this Topic