⦁ Problem: The sidebar on the shop page is not showing. ().
⦁ What I need help with: TO get sidebar in shop page.
⦁ What currently works: in blog pages and single product pages the sidebar shows "which is ok for me for blog and single product pages". (
,
,
]5
)
⦁ Where not showing sidebar: in home page, about me page. which is currently ok for me, no need sidebar for these pages.
⦁ What have I tried:
in the inspect element I noticed there is no sidebar named keyword found in shop page but in blog and single product pages where the sidebar is showing I saw in inspect element I found the keyword'sidebar' code in there. so I think the shop page is not having 'get sidebar code'.
I Wrote some code at end line between div closing content and div closing row, in the 'archive.php' file but didn't work. I thought the archive.php file is for the shop page maybe I am wrong.
</div><!-- #content -->
<?php if($enable_sidebar) get_sidebar(); ?>
</div> <!-- .row -->
</div><!-- .container -->
⦁ what theme i useing : its docent theme useing in wordpress.
⦁ These are theme files from the -appearance /theme editor. ().
⦁ I think these theme files will help you to check what's missing in the code which caused not showing the sidebar on the shop page.
so, I tried my efforts but didn't Figured out how to get the sidebar on the default shop page. what code should I write and where or else? i need help its important .
Answer: To make appear sidebar in shop page or else first we should check some default possible ways .
step 1: check in theme customising- layout&styling the size of layout switched to full width.()
step 2: after clicking widget option to customise widget in the shop page ,if you see notice as 'your theme has 5 widget areas but this particular page dosen't display them .......' (). then this issue is showing because the code 'get sidebar' for this type of page is not available . so you need to check the page type of the shop page ,is it in page type or post type .(
)
step 3: once you check shop page is page type then go to page.php in the theme file from apperance/theme editor/page.php () . and check is 'get sidebar' code is available in anywhere in this page.php file .if not then write this code between '< / div > < ! - - / # content - - >' code'< / div > ' . this will appear sidebar in all pages. (here is correct code format for page.php responsible for shop page):
</div> <!--/#content-->
<?php get_sidebar(); ?>
</div> <!-- .row -->
step 4: if sidebar appearing below content not in side then you should use 'class row ' and put code at before end of row div. it auto make two colum one for content left and one for sidebar right so that it will auto align sidebar in side of content.()
step 5: if you want to appear sidebar in one page like only shop page then use code-(
</div> <!--/#content-->
<?php if ( is_shop() ) :
get_sidebar( 'shop' );
endif;
?>
</div> <!-- .row -->
) instead of simple 'get_sidebar' .
conclusion : check type of page then check code in theme file in that page type like (page for page.php ) .then use code get sidebar to make sidebar appear in all pages in that type of page and use this code to appear in specific desired page .().
</div> <!--/#content-->
<?php if ( is_shop() ) :
get_sidebar( 'shop' );
endif;
?>
</div> <!-- .row -->