Pulling sub-site content into specific pages (2 posts)

  1. mattthr
    Posted 3 years ago #

    I'm working on a school website. The design calls for a collection of largely static pages, but for each class to have a blog which will be updated every few days.

    I know nothing about WordPress or PHP (thought I have development experience on other platforms) but I got the static bits of the site, based on a custom theme, up without too many problems.

    I set up a page for each class blog but I really wanted the authors to use the blogging engine rather than just continually updating a page. To enable this I switched on multi-site, based on URL, and set up some blogs in the sub-site for each class.

    However I'm now stuck on how to make the standard index.php I created for the static pages display blog content instead for certain sections of the site.

    I'd also like to add a right-hand widget that will display the most recent three entries from blogs, regardless of what class their from.

    Ideally I also need to add a date to the page title for blogs, but not for the static pages on the site.

    Anyone help?

    Current Index.php code:

    <div id="column-center">
         <?php if (have_posts()) : while (have_posts()) : the_post();?>
         <p style="font-size:22px;"><?php the_title();?></p>
         <hr class="hr-red" />
         <div style="font-size:13px;">
         <?php the_content(); ?>
         <?php endwhile; endif; ?>
         <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  2. grosshat
    Posted 3 years ago #

    Mmmm, having no idea about PHP and WordPress does not help. As a global advice, I would suggest you read the basics of how WordPress manages themes and templates files:


    There are specific files for managing posts and pages separately, since for WordPress they are different content types.

Topic Closed

This topic has been closed to new replies.

About this Topic