WordPress.org

Ready to get started?Download WordPress

Forums

Hide content if in... site_id? (3 posts)

  1. T B
    Member
    Posted 3 years ago #

    How can I insert content to the page.php or single.php, for only one blog (e.g.: ID:45).

    Something similar:
    <?php if ( in_category( array( 3 ))) { echo '<div id="postcontent">content</div>' ; } ?>

    For page, not for category?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    here is the full list of conditional tags:
    http://codex.wordpress.org/Conditional_Tags

    try either:

    is_single('45') for a post;

    or:

    is_page('45') for a page.

  3. T B
    Member
    Posted 3 years ago #

    Sorry mine miss..

    I mean for blog, not for category?

    There is no any conditional tag for blog.

    I would like insert a picture to the template, for only one blog - ms-multisite.

Topic Closed

This topic has been closed to new replies.

About this Topic