WordPress.org

Ready to get started?Download WordPress

Forums

best place to stick menu (8 posts)

  1. emaarkhan
    Member
    Posted 2 years ago #

    Hi all,
    I am working on a theme, i created another sidebar and i was wondering where to place it. for now i placed the dynamic_sidebar code in index.php but when i click on other pages. it doesn't show.
    the following line in place in index.

    <?php dynamic_sidebar('my-sidebar'); ?>

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    And is your sidebar file called sidebar-my-sidebar.php?

  3. emaarkhan
    Member
    Posted 2 years ago #

    yes

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    If you want this new sidebar to appear on all pages, have you tried adding <?php dynamic_sidebar('my-sidebar'); ?> to header.php or footer.php?

  5. emaarkhan
    Member
    Posted 2 years ago #

    I did but the result isn't like before. for now that line rest beofre get_footer

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Then you'll need to add the same line to all of the relevant template files in your theme.

  7. emaarkhan
    Member
    Posted 2 years ago #

    when we see pages, page.php is viewed right?

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Yes.

Topic Closed

This topic has been closed to new replies.

About this Topic