• Resolved Sany

    (@sannny)


    Hello,

    I’m using the plugin ‘Custom Sidebars’ for managing my sidebars. I created a new sidebar which I want to assign to my front page but it doesn’t work. The default sidebar of the theme is always shown there. On other pages / posts everything works fine, the problem seems to occur only with the front page.

    With other themes it works (get_sidebar()) so I would say this is a ‘theme problem’. I tried to change some code in index.php file but without success.

    Can you help me, please?

    Best regards
    saNNNy

    • This topic was modified 6 years, 4 months ago by Sany.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Sanny,

    You will need to customize the theme for this. You can also consult with a developer.

    Thanks!

    Thread Starter Sany

    (@sannny)

    Yes, but how can I customize the theme so that I can use a custom sidebar on front page?

    Thread Starter Sany

    (@sannny)

    I tried to replace get_sidebar(); in index.php with dynamic_sidebar();. This works for the sidebar itsself but not for the correct styling. Does someone know what I need to add? cs-6 is the id of my custom sidebar.

    $class_to_add = 'col-md-offset-1';
    					
    if(is_active_sidebar('cs-6')) { ?>
      <div class="col-md-3 blog-sidebar-wrapper <?php echo esc_attr( $class_to_add ); ?>">
        <aside id="secondary" class="blog-sidebar" role="complementary">
          <?php dynamic_sidebar('cs-6'); ?>
        </aside>
      </div>
    <?php
    }
    Thread Starter Sany

    (@sannny)

    Topic resolved.
    …just working now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Sidebar for front page’ is closed to new replies.