Hot answers tagged

3

On my default calendar widget I get: <td id="today">30</td> so you could use #today. It uses the get_calendar() function where we have the following: if ( $day == gmdate( 'j', $ts ) && $thismonth == gmdate( 'm', $ts ) && $thisyear == gmdate( 'Y', $ts ) ) { $calendar_output .= '<td id="today">'; } else { ...


3

You need to add the widget to a plugin and submit the plugin to the plugin directory.


1

To append text to the end of the titles in that widget and nothing more i.e. does not matter the URL, you can just use some CSS. <li> <a class="my-folder-categories">Category 1</a> </li> a.my-folder-categories-folder:after {content:" folder"; This will effectivly make the text appear as so: category 1 folder Be sure to add ...


1

You're not echoing the wrapping divs. The register_sidebar only defines the div, but doesn't render it. You need to extract the texts and echo them, like this: public function widget( $args, $instance ) { extract( $args ); $title = apply_filters( 'widget_title', $instance['title'] ); echo $before_widget; if ( $title ) { ...


1

I am adding another answer to answer this question:- How to exclude certain widget from showing up on home/front page? WordPress has an internal function _get_widget_id_base() I am not sure how safe to use it. But this is the method which WordPress uses to get widget ID base by using widget ID instead of strpos() and strncmp(). Example:- ...



Only top voted, non community-wiki answers of a minimum length are eligible