Skip Navigation

[Resolved] How to display post content in the sidebar

This support ticket is created 3 years, 3 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.

This topic contains 2 replies, has 2 voices.

Last updated by thoraldM 3 years, 3 months ago.

Author
Posts
#2199235

Tell us what you are trying to do?

I have a CPT called "Reviews." Everything's working fine, but I'm thinking of modifying the way the single review page is displayed by placing a custom field (image/Instagram image) associated with the post in the sidebar instead of the main content area with the rest of the post. How do I do this with Toolset? I already have a content template set up that is used in the main content area of the Reviews single post.

Is there any documentation that you are following?

I don't know.

Is there a similar example that we can see?

None I can think of.

What is the link to your site?

hidden link

#2199519

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You would typically add content to a sidebar using widgets, assuming your theme adds support for widgets in a sidebar.

WordPress 5.8 introduced the block-based editor for widgets, but Toolset hasn't added support for this yet, and you may want to use the Classic Widgets plugin (from WordPress) to continue using the traditional widget editor.

You can use shortcodes in widgets such as the text widget or custom HTML widget.

In your existing template, try outputting the custom field you want to use via a Fields and Text block (using the Fields and Views button which looks like a Toolset icon), where in HTML mode you will be able to see the format of the shortcode used to output the field. You can paste the same shortcode into a widget used in your sidebar.

Alternatively, if your theme settings permit, use a full-width template for the post type (i.e. no theme sidebar), and create the "sidebar" within the Toolset template, by using column or grid blocks to split the output into two columns, one for the main content, and the other for the "sidebar".

#2199689

Thanks Nigel. I was able to do it using shortcodes + widget. I had to install a plugin that revives the Classic Widgets interface.

I had no idea that Toolset shortcodes would work outside of the main content loop. Thanks for that tip.

All is well now. Cheers!