• Hi,
    I’m very new to web publishing and I’ve been learning as I go. I wanted to put a RSS feed button on my sidebar and tried to create a text widget. The thing is that every time I activate a widget my entire sidebar gets all messed up. I can’t see my calendar, ads, links and other buttons.
    It’s not just the text widget. Every time I have tried to use one the same happens.
    I’ve just resorted to not using any widgets but that can’t be right. Why give up using a feature that may enhance my site, right?
    Any ideas?

    Thanks a los for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • In many themes, as soon as you add a widget, the hardcoded sidebar content is replaced by the widget. As you want both to use widgets and retain the hardcoded sidebar, you’ll need to edit your sidebar.php file.

    Near the top of this file, you should see a line that begins with:

    <?php if (!function_exists('dynamic_sidebar')

    We’ll call this Line A. Near the bottom of the file, you should see a line:

    <?php endif; ?>
    This will be Line B.

    If you want your widgets to appear at the top of your sidebar, move Line B so that it is immediately below Line A.

    If you want your widgets to appear at the bottom of your sidebar, move Line A so that it is immediately before Line B.

    Thread Starter freshy

    (@freshy)

    Hi thanks for the reply.
    I tried moving line B but then I got no sidebar at all!
    I’m using the comic press theme.
    And yes, it happens just as you say. AS soon as I add a widget the entire sidebar is replaced.

    Can you drop a copy of your sidebar code in the WordPress pastebin?

    Thread Starter freshy

    (@freshy)

    Hi,
    sorry for taking so long replying but I’ve has a lot of work this week.
    I pasted my code here:

    https://wordpress.pastebin.ca/1457303

    Thanks for your help again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Widgets mess up my page’ is closed to new replies.