Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Different Widgets / Sidebar for each menu (http://forum.bytesforall.com/showthread.php?t=20101)

movie-ink Apr 11, 2013 04:02 AM

[SOLVED] Different Widgets / Sidebar for each menu
 
Would anyone know how I can get a different sidebar with different widgets showing for the pages related to the two menu's I use?

Our site shows info on a Gallery and on a Web shop. I want to keep to keep them separated e.g. I do not want to bother visitors to the Gallery part with info on things they can buy in our shop.

http://www.hazardousoperations.com/movie-ink_wp/

I would love to be able to select which widget shows up on which page.

:confused:

Cheers

juggledad Apr 11, 2013 04:17 AM

two ideas
1) use two sidebars and just show the one you want on the page you want - see the 'Style & configure SIDEBARS' options
2) use one sidebar and a plugin like 'widget logic' or 'viual widget logic' to control the page the widget shows on

movie-ink Apr 11, 2013 07:50 AM

Hi Juggledad,

Thanks for the quick reply. Could you tell me where to find the 'Style & configure SIDEBARS' options?
Will have a look at the plugins as well.

Thanks!

juggledad Apr 11, 2013 09:58 AM

sorry, that is an Atahualpa option, I didn't notice that this is a Montezuma question

With Montezuma, you should create a new virtual template - copying the existing virtual 'page.php' template - and call it 'page-nn.php' where nn is the page id or call it 'page-xxxxxxxxx.php' where xxxxxxxxx is the page slug (if you had a page called 'activity' you would use 'page-activity.php')

Next edit this template and near the bottom you will see a dynamic widget area. Call it something else and now you will have two different widget areas and can put the widgets in the one you want.

movie-ink Apr 18, 2013 03:36 AM

Hi Juggledad,

Thanks for the advice so far. I managed to do as you told and everything seems to be working, though I do not understand how to get the original widget area on the blog related pages and the newly made widget area on the shop related pages.

Thanks,

Erik

juggledad Apr 18, 2013 04:59 AM

so you created a virtulate template called 'woocommerce-page.php' correct?
did you change the name of the widget area as I told you to in my last post? you need to change the code
HTML Code:

        <div id="widgetarea-one" class="col4">
                <?php dynamic_sidebar( 'Widget Area ONE' ); ?>
        </div>

to something like
HTML Code:

        <div id="widgetarea-shop" class="col4">
                <?php dynamic_sidebar( 'Shop page widget area' ); ?>
        </div>

then you will see the new area at dashboard->appearances->widgets

movie-ink Apr 18, 2013 05:17 AM

Yeah that is what I did. When I go to the widget tab I see both area's now.

juggledad Apr 18, 2013 05:52 AM

so did you put different widgets it the two areas?

movie-ink Apr 18, 2013 06:01 AM

yes but now both blog and shop only show widget area one

juggledad Apr 18, 2013 06:12 AM

go to mto->Export Import and copy the 'Current Montezuma Settings to a TEXT file and attach it to a reply

movie-ink Apr 26, 2013 04:45 AM

1 Attachment(s)
Hi Juggledad,

Sorry for the slow reply. Great if you could have a look at this matter.

Regards,

Erik

juggledad Apr 26, 2013 05:09 AM

So what type of page is 'The Gallery'?

In the wordpress template hierarchy (if you don't know what this is, do a google search), what templete would be used with this page?

movie-ink Apr 26, 2013 05:25 AM

'Gallery' is the page for the blog an all info related to our Movie Poster Gallery based in Amsterdam
'Shop' refers to the shop part - our online poster selling that we wish to see as a separate thing from our Gallery.

'Gallery' is the main page, 'Shop' is in fact an extra part added to the Gallery.

Would that work?

juggledad Apr 26, 2013 05:30 AM

what I am asking is what type of WordPress page is that - ie is it a page page, a single post page, archive page, a category page?

movie-ink Apr 26, 2013 05:44 AM

Mmm I am not sure. Attached a screenshot. Would it help if I gave you a login?

Thanks for the incredibly quick replies!

juggledad Apr 26, 2013 06:56 AM

1) there is no screen shot
2) I know the answer, I'm making you dig and learn the answer

movie-ink Apr 26, 2013 07:04 AM

1 Attachment(s)
1. screenshot attached.

2. bring it on.

juggledad Apr 26, 2013 07:18 AM

so use firebug and look at the page and look at the <body...> and see what classes it has. this will tell you the type of page.

Then download the template hierarchy (remember I told you to google search this) and see what's used for that page type and report back your findings.

movie-ink Apr 26, 2013 09:13 AM

it says:
archive category category-movie-ink-the-gallery category-23

juggledad Apr 26, 2013 01:22 PM

Good, that answers 50% of my questions, but that is not a passing grade.

studioelle Apr 28, 2013 09:52 PM

If you don't feel like you can figure out the preferred sidebar widget per page coding, you could always use Display Widgets. http://wordpress.org/extend/plugins/display-widgets/

movie-ink May 17, 2013 04:48 AM

Hi Studioelle & Juggledad,

Thanks for the advice. I decided to use the plugin as it is far more easy for me. Thanks for the advice on coding though Mr. Juggledad!

Best,

Erik

juggledad May 17, 2013 06:04 AM

so is this working for you then?

movie-ink May 17, 2013 06:47 AM

yeah works great! Solved. Thanks.

Erik


All times are GMT -6. The time now is 07:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.