Skip Navigation

[Resolved] Custom sidebar for Post Types

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 5 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1249217
custom-sidebar.PNG
sidebar.PNG

I have created a post type called Articles. This post type is supposed to have a sidebar. This would be fine if I wanted to use the Appearance Widgets > Default sidebar. But now that I have created the Custom post type there is nowhere for me to add the dynamic sidebar that I have created.

Is there a way for me to tell my Custom post type that is should be using the dynamic sidebar

The Layouts plugin is not currently an option.

#1249267

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - sidebars are not controlled by Toolset as Toolset will have only effect on the the_content() part (the body) part. Sidebars are controlled using your theme settings or you need to manage it on your own.

If you will use one of our recommended theme's, then when displaying single posts you can control the sidebar.
=> https://toolset.com/documentation/recommended-themes/

#1252785

Thanks Minesh

That makes sense. I think I need to register the sidebar to use on my custom posts by adding some code to functions.php - along the lines of the link below

hidden link

Do you have a snippet of code avaliable that I would need to use to register a sidebar with a Toolset Custom Post Type (created with Types)?

Thanks

#1252821

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - we do not have such code snippets but you can check with your theme author or theme support as this needs custom programming which is beyond the scope of our support policy.

Or

Try to follow the following tutorials:
=> hidden link
=> hidden link
=> hidden link

#1257007

Thanks Minesh - I have already registered the custom sidebar using functions.php. But in order to render the custom sidebar in my custom posts, I need to edit the "Articles post" file. But because I have created the Articles Post type using Toolset Types it is not available to edit so I cant add my sidebar?

#1258401

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - in this case, I think you need to create a single PHP template for your post type and style the PHP template as required and place the sidebar within this single PHP post type template.

More info:
=> https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/#custom-post-type-templates