• Resolved fosterTerence

    (@fosterterence)


    How to I create a custom sidebar for a page with no posts found in a category? This used the content-non.php template-part. I see that for content-404.php I can choose a sidebar. Is it possible to do it for this page to?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @fosterterence

    Hope all is well!

    Please let us know more information, do you wish to add a sidebar to a 404 page? If your theme allows adding a sidebar to a 404 page, from Appearance > Widgets then after enabling Custom Sidebars plugin it should show this location. The plugin places custom sidebars only to sidebars that are implemented in the theme.

    Otherwise, it needs to be added with custom coding to a page template. Please see an example here

    Please let us know if you have any further questions!

    Cheers,
    Nastia

    Thread Starter fosterTerence

    (@fosterterence)

    Hi Nastia, I have setup the custom sidebar for a 404 page, that works fine. There is also a standard content-none.php template-part which is shown when a category has no posts. This is the page I would like to assign a custom sidebar. There is no option under Widgets -> Appearance to assign it to this page.

    Hello there @fosterterence,

    hope you’re doing good and don’t mind me chipping in! ??

    As you mentioned, this is a “template-part” meaning that’s part of another template, which can’t be targeted by our plugin directly.
    So, if this part is being called by index.php for example, then you can only set custom sidedar for Post Index.
    Hope that makes sense!

    Warm regards,
    Dimitris

    Thread Starter fosterTerence

    (@fosterterence)

    Hi Dimitris,

    Found the cause of the issue. I thought with custom sidebar plugin I configured the sidebar to be visible on certain categories in the default language. Because of WPML I need to configure the category name for each language for Archive category. -> now the sidebar shows even when there is no post result.

    Thanks anyway!

    Thread Starter fosterTerence

    (@fosterterence)

    Case closed

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘content-none template-part sidebar’ is closed to new replies.