StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-15-2012, 12:33 PM
jjaycallejas jjaycallejas is offline
Registered User
Pro Plus Member
 
Join Date: Nov 2011
Posts: 154
Default hard coding sidebars into custom post type

Hi,

Does anyone know how I can assign custom registered sidebars into a custom post type? I know how to create custom post types and register my own sidebars, but I'm not quite sure how to put them together.

So lets say I have 3 different post types that all have a sidebar-content layout. I was thinking about something like this

remove action (primary sidebar, do primary sidebar)
add action (primary sidebar, new sidebars)
function (new sidebars) {if custom-post-type-01, echo custom sidebar}

I would then repeat the process for each custom post type. Does that seem right to anyone? I'll do some digging but I'm unsure about how to write the if statements.

I think simple sidebars accomplishes this, but I installed the plugin and the featured sidebar doesn't appear in the post editor. I'm assuming this has to do with them being custom post types? Anyway, I think writing this function into the theme would be the way to go. I'm trying to minimize my plugin use anyway.

Thanks!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard Coding Post Title to Home Page rharejr General Discussion 2 02-26-2010 12:30 PM
Hard Coding Carousel wpuser General Discussion 3 11-21-2008 04:50 PM


All times are GMT -5. The time now is 06:25 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.