Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #219506

    Hi there,

    I’m using Events Manager Pro and the sidebar on Event Category pages is empty. The Event Category pages are using page.php as template.
    I have made multiple custom widget areas in WordPress. Now I want to call one of them if the page is a Event Manager Category Page. I want to use something like this:

    if (em_is_category_page() ) {
         // Display all widget in widget area called "Agenda"
    }

    How do I do this?

    #219599

    Hey Alcadis!

    I’m not sure if this is what you want but edit page.php, find this code:

    //get the sidebar
    				$avia_config['currently_viewing'] = 'page';
    				get_sidebar();

    Replace it with this:

    //get the sidebar
    				$avia_config['currently_viewing'] = 'page';
    				if (!em_is_category_page() ) {
    				get_sidebar();
    				} else {
    				echo '<aside class="sidebar sidebar_right smartphones_sidebar_active three alpha units" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar"><div class="inner_sidebar extralight-border">';
    				dynamic_sidebar( 'Agenda' );
    				echo '</div></aside>';
    				}

    Regards,
    Ismael

    #219856

    Thanks a lot!

    This is exactly what I needed. Problem is solved now.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Calling a specific Widget Area’ is closed to new replies.