The MU forums have moved to WordPress.org

Dynamic Content (3 posts)

  1. verbal36
    Member
    Posted 18 years ago #

    I currently have my home page setting to go to a static page.

    Ideally, what I'd like to have in place is that unregistered users see the static welcome page, and members who either are already logged in/log in..see a specified blog category on the front page.

    Logically..I dont know if this possible with MU..but I wanted to do if anyone has done something like this and can of point me in the right direction to work towards.

  2. lunabyte
    Member
    Posted 18 years ago #

    home.php, and then run an if/else on is_user_logged_in(), and include a custom file depending on which it is.

    The custom file, of course, being what you want logged in users or guests to see.

  3. dsader
    Member
    Posted 18 years ago #

    How about this. Add an

    <?php	if (is_user_logged_in()) { ?>
    an
    <?php } else { ?>
    
    and a closing
    <?php }  ?>

    Example my home.php
    `<?php get_header(); ?>
    <div class="content">
    <div id="primary">
    <?php if (is_user_logged_in()) { ?>
    <h2>Recent Posts</h2>
    <?php require_once(ABSPATH . WPINC . '/rss.php'); ?>
    <?php ah_recent_posts_mu(); ?>
    <?php } else { ?>
    <?php include (TEMPLATEPATH . '/theloop.php'); ?>
    <?php } ?>
    </div>
    <?php get_sidebar(); ?>
    </div>
    <?php get_footer(); ?>

About this Topic