• Hello all,
    I wanted to put on my site something like a filter for posts based on categories.
    I have that “MyDomain Blog” – and I want to add there buttons for my categories – I know where it is, so I only need a proper code. And there I think would be problems.
    So I basically want something that allows me filter what is visible on main blog. Maybe a plugin?

    I thought it could be achieved by iframes – but they are lame, areny they? ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • You just need to set the links in your buttons to the category you wish.
    Here is an example of a link: https://www.cec.fiu.edu/category/featured/
    and you will also notice categories on right hand side.

    Your link structure will include the term “category”

    Thread Starter zel

    (@zel)

    Yeah, but I want all of them show on the main page, without affecting it ?? it seems to work at your page, but in mine I got ‘blank’ page with all posts.
    https://www.turboimagehost.com/p/15052420/nah.png.html – its area which i would like to affect

    https://www.inquest.pl – its my site.
    https://www.inquest.pl/category/szkolenia – and you can see how the link would look like.

    Thread Starter zel

    (@zel)

    I guessed the code showing the blog on mainpage is:
    <?php
    if ( get_option( MTHEME . ‘_mainpage_type’ )==”default” ) {
    include ( TEMPLATEPATH . ‘/includes/mainpage/index-default.php’);
    } else {
    include ( TEMPLATEPATH . ‘/includes/mainpage/index-bloglist.php’);
    }
    ?>
    Well, I’m using index-bloglist.php
    So I pasted instead of that code a code from bloglist:
    <?php
    $args = array (
    ‘paged’ => $paged
    );
    query_posts($args);
    ?>
    <div class=”entry-mainpost-title”>inQuest Blog</div>
    <?php get_template_part( ‘loop’, ‘blog’ ); ?>

    I changed the:
    <?php get_template_part( ‘loop’, ‘blog’ ); ?>
    to
    <?php
    rewind_posts();
    get_template_part( ‘loop’, ‘category’ );
    ?>
    but it still shows all the posts… what’s wrong? ??

    Thread Starter zel

    (@zel)

    Amado.Miami can you just email me your category.php please?
    z3lgadis[attt]gmail.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Blog: Filtering posts on main page by category’ is closed to new replies.