WordPress.org

Ready to get started?Download WordPress

Forums

Widgets overwrite sidebar file? (2 posts)

  1. kondef
    Member
    Posted 3 years ago #

    Hello,

    I'm using a widget for my "Recent Posts" in my sidebar. When I dropped in this widget, I found that my actual sidebar.php file gets ignored in favor of displaying the widget content.

    As a workaround, I used an HTML / text widget to display some other content (Sidebar image header, mailing list info, facebook 'like' item). Unfortunately this is a limited solution since I can't reorder/wrap content around the widget.

    In this case I want to have a graphic for the side bar header, then the comments widget, and then some other code (facebook and social networking links etc).

    What is the best solution here? Is it possible to use the drag and drop widgets from the wordpress console and still have access to the sidebar.php file? Or do I have to forego the widget altogether if I want a customized sidebar?

    Site URL: http://salmeland.com/blog/

    Thank you!

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Is it possible to use the drag and drop widgets from the wordpress console and still have access to the sidebar.php file?

    Yes but you'd need to edit the sidebar template file to move the default content (that you want to keep) outside of the dynamic_sidebar() conditional.

Topic Closed

This topic has been closed to new replies.

About this Topic