WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help with popupalting a page based on a secondary menu (12 posts)

  1. MaddTechWF
    Member
    Posted 4 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  3. MaddTechWF
    Member
    Posted 4 years ago #

    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.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

  5. MaddTechWF
    Member
    Posted 4 years ago #

    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.

  6. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

  7. MaddTechWF
    Member
    Posted 4 years ago #

    <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?

  8. esmi
    Forum Moderator
    Posted 4 years ago #

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

  9. MaddTechWF
    Member
    Posted 4 years ago #

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

  10. esmi
    Forum Moderator
    Posted 4 years ago #

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

  11. MaddTechWF
    Member
    Posted 4 years ago #

    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.

  12. esmi
    Forum Moderator
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.