• So, this theme works with the sidebar widgets in 2.7. But there are some sidebar items that are repeating because they’re not controlled by widgets, they’re hardcoded somewhere in the sidebar.php file.

    https://www.leecherolis.com/blog

    I can go into wp-admin and clear all the sidebar widgets, which should give me an empty sidebar, but it doesn’t.

    Any ideas?
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Open sidebar.php. You’re looking for 2 lines. The first one (let’s call it Line A) includes the code if (!function_exists('dynamic_sidebar'). The second (we’ll call Line B) includes the code endif;. If you only have 1 of each, great – this should be relatively easy. If you have more than 1 of either, this could get a bit messy…

    First, make a copy of sidebar.php in case everything goes pear-shaped.

    Next, look at what lies between Line A and Line B. This is the code/markup that is automatically replaced by the addition of any widget. From what you describe, it sounds as if you have some code/markup outside of those two lines. If so, move this code so that it lies just before Line B (ie it’s now between Line A and Line B).

    Now save your amended sidebar.php file, add a widget to your sidebar and check the effect. If everything falls to pieces, revert back to that copy of sidebar.php that you made earlier and we’ll try again.

    Thread Starter lcherolis

    (@lcherolis)

    Great info! Thanks! I’ll try it tonight.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need Tip, Editing this theme – Part 2’ is closed to new replies.