Jump to content

Archived

This topic is now archived and is closed to further replies.

dawsonbarber

Need to Get Custom Post Types to Display Different Sidebar Widgets Based on Taxonomy / Terms

Recommended Posts

dawsonbarber+    19
dawsonbarber
What's the best way to get custom post types with different taxonomies/terms to display different widgets in the sidebars?
 
For example, I've created a custom post type for Market Updates with a (hierarchical) taxonomy of Property Types.
 
I've got 3 different Property Types:
  • Detached Homes
  • Townhouses
  • Condominiums
I've created 3 different sidebars using the Sidebar Manager Light plugin: each one named for the above-noted Property Types.
 
I've created 3 different Views using WP Toolset Views for each Property Type.
 
I've added the Views to the sidebars in the WordPress widget area.
 
I'm trying to use the Widgetizer section in the sidebar of each Property Type to display only the same types of properties (i.e., I only want Detached Homes Property Types to display in the sidebar of a Detached Homes custom post type).
 
But it's not happening for me.
 
No matter what, I get the same widgets in the sidebars of different pages (so Detached Homes shows up in the sidebar of Townhouses and Condominiums).
 
I don't seem to be intellectually capable of figuring out how to get specific widgets to show up in the sidebars of specific custom post types (and only in those sidebars).
 
I've tried Widget Logic (the plugin) with conditional tags and have tried custom templates but I can't get it to work and it's doing my head in.
 
The site`s still under development but here`s a link to a page about Detached Homes, in case it helps: http://abbotsfordrealestate.co/market-updates/detached-homes-may-2014/
 
Can anybody tell me what I am missing / doing wrong?
 
Thanks

Share this post


Link to post
Share on other sites
dawsonbarber+    19
dawsonbarber

bump

Share this post


Link to post
Share on other sites
Aires+    258
Aires
Hi, I have done this with regular WP pages but never with custom posttypes but I will give this a try and post the results in a couple hrs.

Sent from my Lumia 900 using Tapatalk

ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
dawsonbarber+    19
dawsonbarber

Hi, I have done this with regular WP pages but never with custom posttypes but I will give this a try and post the results in a couple hrs.

Sent from my Lumia 900 using Tapatalk

 

Thanks very much, Aries.

 

It does seem to be a little tricky with custom post types, especially since I want to exclude certain taxonomy/terms on certain custom post type pages.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

This is more of a WordPress question, therefore, you will be better posting this on the WordPress support forums.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dawsonbarber+    19
dawsonbarber

Hi,

 

This is more of a WordPress question, therefore, you will be better posting this on the WordPress support forums.

 

After rereading my post, I can see that there are three other places that I should have considered raising the issue: Sidebar Manager Light, Widget Logic, WP-Toolset.

 

Dumb question for the DMS customization forum. Sorry for the bother.

 

Cheers

Share this post


Link to post
Share on other sites
Aires+    258
Aires

dawsonbarber I got a little busy yesterday so i wasnt able to post back but i got this to work by using a plugin custom sidebars which you can find  here  . You can see my test pages here on my test site posttype one and posttype two  .

 

http://i.imgur.com/0VELSEQ.png 

 

Plug in was fairly easy to use I didnt run into any issues but thats not to say there aren't any... I didnt really test it out but it does seem to work.

 

 


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
Aires+    258
Aires

I will also add that I didnt play around with all the options above.

 

And I use it with the actual sidebar section and not the wigetizer.

 

And it looks like you can go in and change the sidebar location of sidebar created with other plugins like sidebar manager light just open up the sidebar and options will we available to change the location.

 

Hope this helps 

 


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
dawsonbarber+    19
dawsonbarber

Hi Aries

 

Thanks for this and for taking the time to do this.

 

It looks like the example pages feature the same sidebar/widgets for two different custom post types.

 

I'm trying to get different sidebars/widgets for the same custom post type with different taxonomies/terms.

 

I've tried with the custom sidebar plugin and then again with the sidebar manager lite plugin and with widget logic.

 

I think I may have things sorted now, after I reactivated a different theme framework and removed all custom function edits and every trace of any modification I had done using the other theme framework.

 

I reactivated DMS, did a quick test with widget logic on a widget in the primary sidebar and it worked.

 

So I'm thinking that one of the modifications I had done to the other framework may have left some residue behind that was preventing widget logic from working.

 

Thanks again for your help on this.

 

Cheers

 

Dawson

 

 

Share this post


Link to post
Share on other sites

  • Similar Content

    • Anthony CALCI
      By Anthony CALCI+
      Hello,
      I have switched from the Framwork theme to DMS theme on http://calcipatrimoine.theproofingcompany.fr (miror site of http://calci-patrimoine.com).
      But I have now only the Primary sidebar in the Widget section ! Secondary sidear, Footer sidebar have all disapear...
      Can I have help to have them back ?
      Regards,
      Anthony
    • colleenc
      By colleenc+
      I am having an issue with the size of the font in a text box widget on my sidebar. It has me completely baffled because I have two text widgets on my sidebar and the other one is displaying perfectly. 
      The sole difference between the two is the amount of text in the widget, but that can't be the problem.
      My site is: loveandnudes.com and the text widgets are on the right side at the top. 
      I have duplicated the one with the issue and I am fiddling with it right now to see if I can find a solution. But I would love any suggestions. I though CSS would do the trick, but either I tried the wrong thing - or I put it into the wrong place.
      Thanks for your help!
    • Queue-it
      By Queue-it+
      Hi,
      Is it possible to add a sidebar only for one post category? Without adding extra plugins or editing the theme code? 
      I have 4 categories of posts (blog post, news, job listing, case studies) but I want to have a sidebar only for the blog posts to appear. 
      How can I do that? 
      Thanks!
    • flourishdesignstudio
      By flourishdesignstudio
      I am working  on a PL5 site that uses a IDX feed plugin that includes templates for that individual plugin (ex - a property listings template, a single property template, etc.) However, when I edit the Pagelines Content area to also feature a sidebar it will not actually save or apply to any of the other property pages. Are there any know issues with the templates and hierarchy? It appears to be defaulting to read-width and I can't find any way to override this setting.
      Here is a link in case that is helpful to see: http://getreadyforwow.com/ihf/idx/mls-20649468-99_sunny_st_newport_beach_ca_92663
      Is there anything I can provide to you that may be helpful in solving this issue?
       
    • MissT
      By MissT+
      Hi there, the Filter By option within the Masonic section isn't working when a custom post type and custom category is selected.  If you swap to normal posts and categories then it works but sadly not with custom post types and custom categories.
      All posts are shown but when you click on the categories all posts disappear even though posts do have these categories. When you click All all the posts come back. I've tried this on two different websites with the same result.
      Many thanks in advance.
×