• Resolved Anonymous

    Hello all,
    I’ve recently discovered WP and like it quite a bit. So much that I’ve already got two blogs set up and am thinking about creating more.
    What I’d like to do though, is create one master blog and database, then use that to feed specific topics/categories to separate domains.
    I believe this could easily be done with either something in my-hacks, or by simply passing a whichcat parameter in the individual index files.
    I can’t find any indication that a cat parameter can be passed in the_content tag though, so I’m looking for ideas and suggestions.
    – Should I put a custom routine in my-hacks?
    – Should I put individual header files into each domain, with the whichcat parameter specified/hard coded?
    – Should I do this another way?
    Thanks in advance,
    Kathy

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Anonymous

    I’m going to try and reword this so it makes a little more sense.
    My blog is running on DomainA. I have a page on DomainC with this code running successfully:
    <?php require_once “/abs/path/to/wp-blog-header.php”;?>
    <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
    <?php the_date(”,’- <b>’,'</b> -<br>’); ?>
    <b>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></b> by <?php the_author() ?> @ <?php the_time() ?><br>
    <?php the_excerpt_rss(); ?>
    <div align=”right”>…………………………………….
    <?php link_pages(‘
    Pages: ‘, ‘
    ‘, ‘number’); ?>
    <?php comments_popup_link(‘Comments (0)’, ‘Comments (1)’, ‘Comments (%)’); ?>
    </div><P>
    <!–
    <?php trackback_rdf(); ?>
    –>
    <?php include(“/abs/path/to/wp-comments.php”); ?>
    <?php } } else { // end foreach, end if any posts ?>
    Sorry, no posts matched your criteria.
    <?php } ?>
    Results can be seen here:
    https://www.homeofficefiles.com/
    with the actual blog residing here:
    https://www.gurugazette.com/
    Both are on the same server.
    Now, on the results page – What would I need to do so that I only see category 4?
    Thanks in advance,
    Kathy

    https://www.homeofficefiles.com/?cat=4

    <?php the_category_ID() ?>
    You can try using the above tag, to only display those categories that you want. What you could do is check if the post has the particualr category id, and have the post displayed only if it true, for each post.

    Thread Starter Anonymous

    I’d like to see something for this as well. Currently I have two WP blogs with their own sets of db tables and categories but it would be great to use a single set of tables or at least only one admin interface where I could access both blogs.
    The quick fix with cat ID mentioned above if fine if you only want to display certain cats but something more integrated and with different sets of cats for each blog would be preferable.

    Thread Starter Anonymous

    Thanks for trying to help. Unfortunately neither of those suggestions has worked so far ?? I could have put them in the wrong place of the loop though.
    I also discovered that the posts table, in v1.02, does not store cat id info. Instead, I have to do a join with post2cat. Once I learned that I started playing with some custom code in my-hacks, but for some reason it’s trying to put the db name in front of my table names (i.e. dbname.tablename instead of prefix_tablename).
    Anonymous: The central/master admin and one table set is what I was going for too. Plus the fact that if I can get this working, posting to multiple categories would in effect be the same as cross posting to multiple blogs.
    Thanks again,
    Kathy

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Creating Master/Feeder blog & db’ is closed to new replies.