Sidebar in the child pages also in the parent page using PHP (3 posts)

  1. Julian Bode
    Posted 3 years ago #

    I have a WordPress website with pages with a lot of product descriptions, I devided those pages under two menu's that have their own categorie pages. Al those product pages have a sidebar so you can easily navigate to other products.

    I want to add that sidebar to each of the two parrent pages as well. The sidebar apears only on the product pages and that is done by PHP coding,

    Can anyone help me to alter the PHP coding so the sidebars will also apear on the parrent page? Someone else did the PHP coding but I can't reach him at the moment and I need it done before monday.

    Link: http://1136.site.sipo.nl
    Menu's: "Beton" & "Betonstaal"

    PHP page code: http://pastebin.com/n2RtSK9v

    If it is too much work I will wait for my friend to do it for me, Thank you.

  2. riversatile
    Posted 3 years ago #


    If understand well, "Beton" & "Betonstaal" are subcategories ?
    and the sidebar appears only in products (products are posts) ?

    If yes, you juste have to edit the single.php file.
    Then look for a 'sidebar register' like :
    <?php if ( !function_exists('dynamic_sidebar')...

    If you find it, locate it, copy/paste it in the category.php file at the same place that single.php.

  3. Julian Bode
    Posted 3 years ago #

    They are all pages and the pages "Beton" & "Betonstaal" are a description and introduction to the products. I want to add the sidebar on the pages "Beton" & "Betonstaal" as well for clearer navigation.

    The code I posted i found in page.php and this needs to be edited so it includes the pages "Beton"(Page id:35) & "Betonstaal"(Page id:211) I think.

    Thanks for your reaction!

Topic Closed

This topic has been closed to new replies.

About this Topic