WordPress.org

Ready to get started?Download WordPress

Forums

including query with categories as with tags (3 posts)

  1. fabs
    Member
    Posted 5 years ago #

    hi,
    i know there is a feature to combine tags and show the combined results, like in: http://www.myhomepage.com/tag/linux+music
    is there a way to transform this feature to categories?
    if not, is there a way to automatically add tags from the category-names.

    kind regards,
    fabs

  2. MichaelH
    Member
    Posted 5 years ago #

    The template tag, query_posts() (or get_posts) has the 'category__and' argument:

    <?php
      $args=array(
        'category__and' => array(2,6)
        'showposts'=>5,
        'caller_get_posts'=>1
       );
    $my_query = new WP_Query($args);
    ?>

    Resources:
    http://boren.nu/archives/2007/10/01/taxonomy-intersections-and-unions/
    http://wordpress.org/extend/plugins/tdo-tag-fixes/

  3. Romik84
    Member
    Posted 4 years ago #

    I have not found any solution for this yet. I am interested in that too. Looking for a plugin which would allow me to display posts with url as following:

    http://example.com/category/cat1+cat2
    http://example.com/category/cat1+cat2+cat3 etc.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.