This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Sidebar in non-themed post types / plugin pages.

  • Creator
    Topic
  • #23965
    bchastain
    Participant

    Jason,

    I’m demoing a LMS (Learning Management System) called LearnPress and would like to have a sidebar on some of their pages. I’m assuming that I need to create a template override for their templates. Just wanted to check with you first in case I’m overlooking some sort of core theme functionality with Denali.

    I now know how to do this using functions.php with custom post types but this is in my mind a bit different than a custom post type as it’s part of a specific plugin.

    Thanks in advance for pointing me in the right direction.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #23968
    Jason Bobich
    Keymaster

    Hi,

    There are two separate topics here in what I think you’re asking that need to be distinguished:

    1. Sidebar layout – the layout of the sidebars and content. This can be full_width, sidebar_left or sidebar_right. On any given page or post, you can filter this withthemeblvd_sidebar_layout.

    function my_sidebar_layout( $layout ) {
     
        // Modify $layout if necessary ...
     
        return $layout;
    }
    add_filter( 'themeblvd_sidebar_layout', 'my_sidebar_layout' );

    You’ll probably be using WordPress conditional functions here to determine if it’s a current page on your site, in order to change that $layout variable.

    https://codex.wordpress.org/Conditional_Tags

    2. Widget Areas: The widget areas containing a set of widgets that actually shows up in a widget area location.

    For example, if you have a sidebar_right layout on a page, then you have a “Right Sidebar” location on that page. Different widget areas of widgets can be applied to that specific page’s Right Sidebar location. This is all done from Appearance > Widget Areas — there are videos for this in your documentation.

    The WordPress custom conditionals can also be used when assigning these widget areas, by using the “Custom” assignment for a widget area.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.