Support » Themes and Templates » Help with popupalting a page based on a secondary menu

  • Resolved MaddTechWF

    (@maddtechwf)


    I have two menus on my website. Menu1 shows my main pages and Menu2 shows my post shows the categories of Menu1. I’m trying to figure out how to code it so that my posts on my page will be populated off of my second menu.

    Second part to this is how can I set it up so that my post are setup in a table like way and show across two columns and as many rows as needed.

Viewing 11 replies - 1 through 11 (of 11 total)
  • esmi

    (@esmi)

    Forum Moderator

    1. Can you elaborate? I’m not sure I follow you.

    2. Use CSS to assign a width of 50% to each post div and float each div left.

    Well I have a parent category called Test with children called ctest1, ctest2, and ctest3.

    When I click on TEST I want it to load my page and load my Menu2 with its children. I then want to be able to click on one of the children and have it load the posts related to it.

    I know how to do it with CSS but I’m confused on how I would code it with WP.

    esmi

    (@esmi)

    Forum Moderator

    That doesn’t really help on how to tell it to print two posts across and as many rows down as needed to display all posts of that category type.

    esmi

    (@esmi)

    Forum Moderator

    You need to amend your theme’s category template to call your Menu2.

    <?php get_sidebar('menu2');?>

    assuming your Menu2 is in a file called sidebar-menu2.php.

    <div class="service">
                    	<img class="services_icon" SRC="images/internet_marketing_icon.jpg" alt="Internet Marketing" />
                        <div class="service_text">
                            <h5>Internet Marketing</h5>
                            <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy and scrambled it to make a type specimen book. It has survived not only five centuries.</p>
                            <p>But also the leap into electronic typesetting, remaining essentially unchanged orem Ipsum has been the industry's standard dummy text ever since the beggining. </p>
                            <a class="related_projects" HREF="work.html">View related projects</a>
                        </div>
                    </div>
                    <!-- .service -->
    
                    <div class="service services_no_margin">
                    	<img class="services_icon" SRC="images/website_design_icon.jpg" alt="Internet Marketing" />
                        <div class="service_text">
                            <h5>Website design & Development</h5>
                            <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy and scrambled it to make a type specimen book. It has survived not only five centuries.</p>
                            <p>But also the leap into electronic typesetting, remaining essentially unchanged orem Ipsum has been the industry's standard dummy text ever since the beggining. </p>
                            <a class="related_projects" HREF="work.html">View related projects</a>
                        </div>
                    </div>
                    <!-- .service -->
                    <div class="clear_container"></div>

    I need to be able to take the above code and run a loop on it to show my services. How?

    esmi

    (@esmi)

    Forum Moderator

    Why not just create a category called Services and file posts under it?

    I do… I want to load them this way. That was just an example.

    esmi

    (@esmi)

    Forum Moderator

    And what happens when you view the category page now? I’m a bit confused as to what the problem is.

    Okay. I have a page called Services.php. That page calls the get_header() and get_footer() commands like normal. I have a page called Services that has a template associated to it called Services.

    I need to setup the services template to show all the services post using the above template.

    esmi

    (@esmi)

    Forum Moderator

    I have a page called Services.php

    Perhaps this is where the confusion is? And it’s why I pointed you to Category_Templates initially. If you set up a category template called category-services.php, it would pull all posts in the Services category automatically. You could also use <?php get_sidebar('menu2');?> in this template file to call an alternative sidebar.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Help with popupalting a page based on a secondary menu’ is closed to new replies.