• Resolved micky1

    (@micky1)


    When using firebug I can easily see the xhtml that is driving the content of the sidebar widgets. (Usually in the form of h2 and ul and li etc.) What file holds that actual xhtml for these widgets. It certainly isn’t in the sidebar.php file or any of the other files that I can find.

    Any help on the normal location of this html would be greatly appreciated.

    Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • /wp-includes/default-widgets.php

    editing wp core templates is not recommmended, as edits will be overwritten with the next upgrade of wp.

    there is usually another way of doing things.

    part of the html markup is controlled by ‘register_sidebar()’ in functions.php of the theme.
    http://codex.ww.wp.xz.cn/Function_Reference/register_sidebar

    Thread Starter micky1

    (@micky1)

    Thanks for that. Much appreciated! Why I am trying to achieve is to put a footer image (as a bg) at the bottom of each widget section. I have placed a bg “header image” in the h2 element and a repeating bg behind each widget, but the footer bit of the design is offering me plenty of challenges. Hopefully this is only down to my lack of experience with designing for WordPress.
    Cheers.

    register_sidebar() has the ‘after_widget’ parameter where you can possibly enter an extra span or whatever you might need for your design.

    Thread Starter micky1

    (@micky1)

    Thanks alchymyth. Your help led me to a fabulous article/tutorial by Justin Tadlock that unravelled the complete mystery of styling widgets.

    I would definitely recommend this to any new (or not so new) theme developer.
    Here’s the link;

    Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘where is the widget xhtml?’ is closed to new replies.