Jump to content


Photo
- - - - -

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

custom post types widget logic sidebar manager light widgetizer wp toolset sidebar widget different sidebars different pages different widgets

Best Answer Aires , 09 July 2014 - 12:04 AM

@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  .

 

 

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.

 

 

Go to the full post


  • Please log in to reply
8 replies to this topic

#1 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 155 posts

Posted 02 July 2014 - 03:35 PM

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://abbotsfordrea...homes-may-2014/
 
Can anybody tell me what I am missing / doing wrong?
 
Thanks


#2 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 155 posts

Posted 07 July 2014 - 01:49 PM

bump



#3 Aires

Aires

    Advocate

  • Members

  • 299 posts
  • LocationAlabama
  • Framework Version:DMS2
  • Country: Country Flag

Posted 07 July 2014 - 07:18 PM

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

#4 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 155 posts

Posted 07 July 2014 - 07:48 PM

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.



#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 15818 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 08 July 2014 - 08:42 AM

Hi,

 

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



#6 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 155 posts

Posted 08 July 2014 - 06:58 PM

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



#7 Aires

Aires

    Advocate

  • Members

  • 299 posts
  • LocationAlabama
  • Framework Version:DMS2
  • Country: Country Flag

Posted 09 July 2014 - 12:04 AM   Best Answer

@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  .

 

 

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.

 

 


Edited by Aires, 09 July 2014 - 12:06 AM.


#8 Aires

Aires

    Advocate

  • Members

  • 299 posts
  • LocationAlabama
  • Framework Version:DMS2
  • Country: Country Flag

Posted 09 July 2014 - 12:12 AM

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 

 


Edited by Aires, 09 July 2014 - 12:19 AM.


#9 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 155 posts

Posted 11 July 2014 - 01:25 AM

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

 

 







Also tagged with one or more of these keywords: custom post types, widget logic, sidebar manager light, widgetizer, wp toolset, sidebar, widget, different sidebars, different pages, different widgets