wp_list_pages
does not wrap it’s output in a ul
or ol
tag. That’s up to you.
In other words, if you just call wp_list_pages
, it’s going to spit out a bunch of li
tags, which your browser assumes is wrong and “corrects” the html as it sees fit. Try this:
function widget( $args, $instance ) {
extract( $args );
$title = apply_filters('widget_title', $instance['title'] );
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
echo '<ul>';
wp_list_pages();
echo '</ul>';
echo $after_widget;
}
Related Posts:
- Limit number of Widgets in Sidebars
- How to load Widget javascript + css files only if used?
- check if registered sidebar is active & has widget content
- Adding iframe Content to Sidebar Widget
- How to use wp_dequeue_style() for style enqueued in WP_Widget class
- Storing custom dashboard widget options in wordpress
- $post>ID displays wrong post ID
- Programmatically edit the text of a widget
- Video Embed in Sidebar Widget with Links to Others in Category
- How can I whitelist only specific shortcodes for processing in text widgets?
- Bookshelf plugin and/or widget [closed]
- Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?
- Manual display of widget
- Add a banner to the Dashboard
- Customized widget area – how to override or filter class xoxo?
- How to access widget data from outside widget?
- How to add a description to Widgets?
- Widget options get
- add_page_menu to make shortcut to widgets
- Custom Menus, Widgets & Conditional Statements
- Dynamic widgets
- How do I stop a widget from displaying on mobile site?
- cannot drag and drop widgets since wordpress 3.2.1
- Converting a WordPress widget to a block
- Change recent posts widget title
- Color Picker Showing Twice When Widget Added to Sidebar
- How can I use AJAX to save/update a widget form?
- Display assigned terms with link
- Widget modifications in a child theme
- How to get “Widget Logic” plugin’s input value in a custom widget code (to display on the Widget admin page)
- Extending WP_Widget throws error when Monster Widget used
- Custom html widget with a Joomla-style assigment
- Is there a way to extend the default image widget into a new custom widget and add additional fields to it?
- Conditional Tags Based on Previously Viewed Posts
- Make page jumps in widget
- Query in query for Widget
- How to display first post thumbnail as a background image of a widget?
- Create widget in dashboard displaying a custom user field?
- Widget without DIV wrapper
- Widgets not displaying since 4.3
- Custom widget with WYSIWYG
- Limit number of widgets in widget area
- How to create pagination for homepage with widgetized area?
- Hooking action once but called twice
- How can I add an author-box below a post?
- How to overload the update() of existings widgets?
- Override WordPress Widget CSS Classes?
- Help me out with this Undefined index ?
- displaying tags in a widget
- Dynamic Sidebar and XHTML Validity?
- How to use wordpress content class?
- How to use get_results() in widget front end?
- How to best include widget area just on homepage?
- Remove “Content” and “Discussion” from Right Now Dashboard Widget
- wordpress widgets screen disappeared
- Proper approach to moving complete site from one domain to another AND preserve widgets
- Different widgets in sidebar on sub-children pages?
- Can the qTranslateX-Plugin translate non-article text? [closed]
- Custom widget is not appearing in the admin area
- Static image for embedded YouTube video instead of blank player?
- Random sidebar/widget background
- event organiser not loading in main content area
- Any available action to add content before and after sidebar?
- WP 3.3 RC1 new switch_theme() method foobars sidebars
- How to Catch Last Widget box From Same Widget Area?
- WordPress widget value not save?
- Display Most Recent Post Widget Title On Page
- How can I add a widget area to the top of the Dashboard?
- How do I enable the admin form for a custom widget that is called in a sidebar template, not to widget area?
- Accessing WooCommerce product categories before initialising widget areas
- Create a new recent post widget
- How do I add footer widgets to the StudioPress Monochrome Pro theme?
- How to prevent Widget from echoing to wrong position in DOM
- Search box displaying just title → Default WordPress Widget for Search Box
- Need two sidebar (right and left)in Twenty Seven theme
- Fatal Error (Call to a member function… ) on production site, but not development site
- wp_enqueue_media(); in multiple widgets
- Add Control in Widgets Sub-Panel in Customizer
- How to get sidebar widgets in leftsidebar template
- How to get number of posts in same category as current post?
- conditional widget title
- Add Social Media icon widget to customizer
- three sidebars showing without call
- Widget stuck at particular point when dragging to bottom
- How to add/save/retrieve additional fields to all available widgets?
- Change Widget that display posts from categories to tags
- Help with custom widget
- How to Make widget area on place of comment
- Registered widget is showing up collapsed in the dashboard
- Create a widget to display image and Title?
- Transform php shortcode into a widget [duplicate]
- How add short description Featured Products or Related Products
- Custom tabs widget don’t work in google chrome, is blocked, do not change the tabs. Why?
- WordPress Hide Widget If $_Session Is Active?
- Widget which displays thumbnails, but links to urls?
- Recent posts with different class name for each post and a scrollbar?
- Problem on register/login widgets
- Classic widgets with 5.9+?
- Unable to add options on dashboard widget ?
- is it possible to create custom widgets page in admin?