WordPress.org

Support

Support » How-To and Troubleshooting » how to create a miniblog on a page with in my main blog

how to create a miniblog on a page with in my main blog

  • I’ve looked around for hours at the support and codex docs. I have played around with code and am confident about editing a bit, but I have not found any direct solution to aid me in reaching my goal. I’ve looked at the “post template by category” and “static front page” plugins, and I simply don’t understand how they work. Sorry.

    I wish to create a separate mini-blog which which show all posts to a certain category only on the Page by that name.

    As I “dream” it, the Page title would show in my blog header. When a reader clicks on it, the mini-blog of that category would show, with new posts updated as I post to that category.

    Thanks to anyone who is willing to give me clear instructions on how to accomplish this. As I said, I do not understand how the above plugins will help me, YET.

    sincerely,
    David

Viewing 15 replies - 1 through 15 (of 21 total)
  • how to displa sub catagories on the main page

    shoul i have to edit html

    I am not sure if this is what you are looking for but have a look at this plugin: http://katesgasis.com/2005/10/24/sideblog/

    If I’m reading right, you want to display all categories but one on your main page and then show the exclusion on a different page, maybe like an admin blog or something?

    am I close?

    If you are going for what Starkmann said I might be able to help you in some way. In your main file index.php or what ever Find where you want you little side blog to display and enter this code
    <?php if (in_category('2')) continue; ?>

    The you are going to need to make a category what then find its id # and put it where the 2 is ‘delete the 2’ Then what ever you want to display in your sideblog you will have to put in the category that you have just made.
    Hope this helps.

    That’s the idea of what I want, but I’m afraid those instructions are not helpful. I think I need to create a unique “page.php” file for the new mini-blog.

    I assume the loop needs to be in there somewhere, or does it?

    If anyone has done this successfully, please let me know.

    David

    Do you want both your main blog and your mini blog showing up on your main page or do you want one to be clicked to through a tab, as in http://www.superblogger.com is the general news site and then you click on a link or tab that says admin blog to access your miniblog?
    The instructions above cover the latter the former, is a bit more tricky. It’s probably totally seperate installations and tables.

    http://www.superblogger.com is not a blog at all. It’s a shopping site. I don’t know what it is supposed to show me.

    I want to acces the miniblog by clicking through a tab in my menu bar.

    But I know it doesn’t require a separate install.

    thanks,
    David

    I’m probably missing something obvious (my track record so far today), but let me just float this out there as your virtual pinata.

    Create “mini blog” posts in their own dedicated category.

    Use this plugin to prevent them from showing on the main page: http://ryowebsite.com/wp-plugins/category-visibility/

    Put a link to the the category page in your menu bar.
    For instance, if you using Permalinks, the link would be http://www.yourdomain.com/blog/category/YourMiniblogCatName

    Want that page to look a bit different? Have a look at Category_Templates.

    Close?

    Sounds helpful. But how do I “Create “mini blog” posts in their own dedicated category”?

    Thinking out loud- I write a post to a certain category, say “miniblog”. That category needs its own loop and index, right?

    OR, can I edit the main index.php file and redirect all posts in a certain category to be posted on a newly created page?

    Or…

    I am using K2 theme, with its own peculiar structure. The index.php has no header call.

    I created a page using the default template, linked it using a “links_to” key to the “miniblog” category as suggested by HandySolo, and used the category visibility plugin to hide the mini cat posts from the front page.

    Now the posts show in their own page, but with no style, none.

    This is where I’m stuck.

    My blog it
    http://glitteirngstew.com/muse

    You can check the page called “Domesticity” in the header menu. The two posts I put are Cooking and Eating. Both show, but no template is called up.

    Odds are, your K2 theme probably currently lists categories in the side bar (if it doesn’t, have a look at a blog running the Default theme). Click a category in that list and the resulting page is just posts in that cat.

    As a rule of thumb, WP will handle the display of posts in that category for you. Either by using index.php or Category_Templates. Magic!

    I *think* the plugin I listed will work with K2 variants, but since I’ve never messed with K2, you might want to experiment a bit (or maybe K2 does that already)? The whole idea is just to ensure that posts with the “miniblog” category don’t show up on the main page.

    I managed to get things to work a bit better. I created a VERY crude category page template with lots of cut and paste, which at least syled the page to show the posts. When I opened each post, it was just too messy in layout, though it had my theme style, at least.

    So, I decided to delete the whole project for now.

    I couldn’t get the posts to that category NOT to show in the recent posts listing, even though they weren’t visible anywhere else.

    Close, but no cigar.

    sorry, not trying to throw you off with the super blogger link, I meant that to be an made up name, didn’t think about it linking to something.

    As for creating a category of mini blog, it’s easy.

    Ethan and handy have given you everything.
    I made one for this guy: http://www.bemoretraining.com/blog
    and yeas that one is meant to be a real link

    EDIT: realized I said it was easy but it was huge pain to me at the time, but that is the way of things. You’ll get it, these guys have taken good care of you.

    dtclarinet

    @dtclarinet

    Starkmann- The blog you linked to is exactly what I want. I think the way I had it set up was about what you and ethan and handy were suggesting. I’ll mess with it when I have lots of time.

    Question for EthanNeuen
    When you suggest I add the php call to a category to my “main file index.php or what ever …” which file do you suggest? In K2 there is a loop.php will calls the post from the database. There is no such loop in the index.php.

    thanks for the helpful and patient suggestions.

    D

    If I understand what you want to do correctly, here is a simple, off-the-top of the head solution.

    1. Using whatever method you found above to “eliminate” a category from your category list, wherever your category list is shown, if you don’t want that category shown in that list.

    2. Create a manual link to your chosen category (let’s call it Alpha with an ID number of 5) in your WordPress Theme header template file where you want the link to the category to appear.

    <a href="/index.php?cat=5">Alpha</a>

    3. Using the Template Hierarchy, create a Category Template called category-5.php and put it in your WordPress Theme folder.

    Make it “look” however you want it to look by copying the code and design elements from your index.php or category.php. Be sure to include the “includes” for the header, sidebar, footer, etc. You may want to change the_content() to the_excerpt() to show only excerpts not full posts. You can include custom text or whatever you want on that template file.

    4. When a user clicks on the Alpha link, it will automatically call up the category with ID number five and show only the posts within that category. There is nothing you have to do to the WordPress Loop or anything.

    If category 5 shows up in any category list, like in a category list on a post, any time anyone clicks the Alpha category, WordPress will automatically display that custom category page.

    There is nothing more “special” you have to do.

    Part of the confusion on this was your use of “page”. In WordPress, a “Page” is a special type of web page and a “page” is another word for “web page”, which is any web page on your blog. A “post” is a web page with your post content, and that uses the WordPress Loop to be generated on your WordPress blog web pages.

    Putting a self-generating list of posts from a specific category on a Page makes things complicated. However, customizing a category page is easy, no messing with the Loop.

    PART II

    If you would like a list of the posts ONLY in the Alpha category to be seen in a special section on the front page of your blog, that’s a different issue. There are a lot of ways you can do this. If you want it to appear on every page, see query_posts or check out Customizable Post Listings WordPress Plugin by Scott Reilly to show the posts from a specific category, from inside or outside the WordPress Loop.

    If you want the list of Alpha’s post to appear ONLY on the front page and not on the other web pages on your blog, then you can use a conditional tag statement in your sidebar, header, or wherever, that lists the last 5 posts in that category:

    <?php
    if (is_home()) { ; ?>
    <h5><a href="/index.php?cat=5">Alpha</a></h5>
    <ul>
    <?php
    $myposts = get_posts('numberposts=5&category=5');
    foreach($myposts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>">
    <?php the_title(); ?></a></li>
    <?php endforeach; ?>
    </ul>
    <?php }; ?>

    I shouldn’t write code this late at night, so someone please fix this if I messed up.

    There are a lot of ways you can do this, including with the Customizable Post Listing WordPress Plugin or using a feed link to that specific category in a Widget or manually generated so you wouldn’t have to use all that code. Try one of the various Feed/Syndication WordPress Plugins to help you do this to make it easier.

    Hopefully this will help you do what you want. You can also set up a whole separate blog within a blog, but you are only messing with a specific category that you want “within” your current blog. This also allows you to change your mind when you are done highlighting that specific category, giving you more flexibility.

    Am I on the right track?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘how to create a miniblog on a page with in my main blog’ is closed to new replies.
Skip to toolbar