WordPress.org

Support

Support » Themes and Templates » 2 category in 1 category

2 category in 1 category

Viewing 4 replies - 1 through 4 (of 4 total)
  • Create a page template wich Custom Query (easy way : http://wpquerygenerator.com/) and then add this template to the page where you want to display 2 categories 🙂

    I dont know how to do it .. can u do this for me ?

    Do you have access to your FTP ? If so duplicate the page.php page on this server, follow those instructions to create a template : http://codex.wordpress.org/Page_Templates

    And replace the content of the page with something like this

    <?php
    
        $custom_query = new WP_Query(array(
            'cat' => '4, 6',
            'posts_per_page' => 10,
            'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1
        ));
    
    ?>

    (modify featured & home to the ID of your categories 🙂 Then you just have to create a page and choose the template you created from the right part of the edition area 🙂

    esmi

    @esmi

    Forum Moderator

    Ideally you should be creating a child theme for these changes – not editing the main theme.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2 category in 1 category’ is closed to new replies.
Skip to toolbar