• Resolved peterchic

    (@peterchic)


    Hello,

    I’m having trouble locating some custom sidebars. I’ve checked the functions.php file where the register_sidebar() should be located. The theme seems to be directing it to another file, in which I was able to locate two default sidebars. However, there seems to be a user generated sidebar section in the code that is populating the additional sidebars on the widget page that I cannot seem to locate. Please see code below

    //Default Sidebars
      register_sidebar(array(
        'name'=>'Bottom Widgets (not footer)' . $myhelper->wpml_current_language,
        'id'=>"bottom-widgetbar" . $myhelper->wpml_current_language,
        'before_widget'=>'<section class="' . $myhelper->get_class_by_column_count(0, 
        'ic_sking_bottom_widget_bar_column_count') . ' sidebar-widget">',
        'after_widget'=>'</section>',
        'before_title'=>'<div class="h6-wrapper"><h6>',
        'after_title'=>'</h6></div>'
      ));
    	
    //Default Sidebars
      register_sidebar(array(
        'name'=>'Footer (Copyright etc...)' . $myhelper->wpml_current_language,
        'id'=>"footer-sidebar" . $myhelper->wpml_current_language,
        'before_widget'=>'<section class="span6 sidebar-widget footer-sidebar">',
        'after_widget'=>'</section>',
        'before_title'=>'<h6>',
        'after_title'=>'</h6>'
      ));
    	
    //we need to define this class to arrange footer bar
      $myhelper->set_footer_style( "#bottom-widget-wrapper section:nth-child(" . ot_get_option("ic_sking_bottom_widget_bar_column_count") . "n+1) { clear:both; }" );
    		
    //Load user generated sidebars
    		
    $args = array( 'post_type' => 'ozy_sidebars', 'posts_per_page' => 200);
      $loop = new WP_Query( $args );
      while ( $loop->have_posts() ) : $loop->the_post();
        $post = get_post( get_the_ID() );
        register_sidebar(array(
          'name'=> get_the_title() . $myhelper->wpml_current_language,
          'id'=> 'dynamicsidebar' . $post->post_name . $myhelper->wpml_current_language,
          'before_widget'=>'<section class="sidebar-widget">',
          'after_widget'=>'</section>',
          'before_title'=>'<h6>',
          'after_title'=>'</h6>'
        ));
      endwhile; wp_reset_postdata();
    

    The “load user generated sidebars” section is populating additional sidebars within the WP dashboard widget page, but I’m not sure where they are.

    If anyone has any idea how to troubleshoot this, I’d greatly appreciate the help!

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try going to your-url.com/wp-admin/edit.php?post_type=ozy_sidebars since those sidebards are a custom post type (most likely initialized by the theme itself).

    See if that opens up any Admin Page where you can create sidebar locations so you’ll know where to look the next time around.

    Thread Starter peterchic

    (@peterchic)

    Jackpot! Can’t believe I didn’t see that! Thank you, sir!

    • This reply was modified 6 years, 4 months ago by peterchic.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Locating Custom Sidebar Content’ is closed to new replies.