WordPress.org

Ready to get started?Download WordPress

Forums

Combining Blogs (4 posts)

  1. drgene113
    Member
    Posted 5 years ago #

    I currently have 6 wordpress blogs. Updating the plugins and configuring 6 different blogs has become very time-consuming.

    The subdirectories are:
    http://www.mmti.org/podcasts/assessment
    http://www.mmti.org/podcasts/boardexam
    http://www.mmti.org/podcasts/massagetherapy
    http://www.mmti.org/podcasts/medicalmassage
    http://www.mmti.org/podcasts/myofascial
    http://www.mmti.org/podcasts/sportsmassage

    They are new blogs and don't have much content. They each have their own theme and configuration.

    Would I be able to combine the 6 blogs into one blog and have them share the same plugins?

    I read something about a plugin that will allow you to hide or place widgets wherever you want. For example: could i put all posts under one category, have that category have its own theme and also place category specific widgets on that page..such as last 5 posts, top 10 viewed posts in that category.

    Thanks
    Gene

  2. stvwlf
    Member
    Posted 5 years ago #

    Hi

    Two approaches:
    1) assign posts to categories and display only one category on each of your existing pages.

    sample code added to page.php below

    2) switch to subdomains and use the wp-hive plugin to run all 6 installations from a single install of code and plugins.
    http://wp-hive.com/

    for #1:
    to display one category on a page:
    1) edit theme's page.php template in a text editor - not a word processor
    /wp-content/themes/{themename}/page.php

    2) find the start of the WordPress loop
    ( looks something like this- sometimes on one line)

    <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>

    3) add this next code before those lines - add your additional categories, change the category ID codes to the ones on your installation. the text in is_page('xxx') should be the page slug (URL) from your static WordPress page

    <?php
    $cat = '';
    if (is_page('events')) {
       $cat = '6';  // the WP category ID code for the events category
    } elseif (is_page('activities')) {
       $cat = '11';  // the WP category ID code for the activities category
    }
    
    if ($cat) {
      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
      query_posts("cat=$cat&amp;paged=$paged");
    } ?>
    
    [loop starts here]   === delete this line - next code is already in page.php
    
    <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>

    see http://codex.wordpress.org/Template_Tags/query_posts

  3. stvwlf
    Member
    Posted 5 years ago #

  4. drgene113
    Member
    Posted 5 years ago #

    Thanks for the info. I also received some advice about restricting pages based on categories using one wordpress intalaation.
    what would be an advantage of using WordPress MU if I will be the only person adding content.
    Thanks
    gene

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.