Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Antar

Sidebars?

Hello, All –

Maybe I missed this one but why can’t I use Admin Columns to select a sidebar for my page or post. Seems like it would a very useful thing to be able to do.

:0)

Perch

4 years, 3 months ago
Stefan
Developer

Hi Antar,

Can you tell me how you want to make add the sidebars dynamically on your page? I think you’ll need a custom field to store the sidebar ID or slug and use it within your template files to show the correct sidebar. So since there is no default way to store a sidebar preference to a page, we can’t any default logic in our plugin.

I can think of a way to make this work, but you’ll need a plugin like ACF, Pods or Types to create the custom field for your sidebar. ACF even has an integration to select a sidebar from a field (it hasn’t been updated in over 2 years). https://wordpress.org/plugins/acf-sidebar-selector-field/

After you have this field available, you can use our plugin to create a column for it. Since we don’t have an integration for this ACF sidebar selector, you can use the custom field column, make it editable and use the following filter to alter the inline edit functionality. You can change the textbox to a selectbox and populate the dropdown with the key->value (ID->Name) of the sidebars. You still neet to make it work in your theme though :)

acp/editing/view_settings

Other than this, I don’t know how we can provide a good solution for this in our plugin because like I said, there is no default way to store a sidebar to a post/page and make it work in every install. But it would sound like a very useful third party plugin ;)

4 years, 3 months ago
Antar

Hi Stefan –

Thanks for this. My mistake. I assumed there was a default method to store a sidebar.

Regards,

Antar

4 years, 3 months ago
Stefan
Developer

No problem Antar, I will close this ticket.

4 years, 3 months ago

You must be logged in to reply to this topic.