Removing side bar widgets from GovPress theme

I believe you are talking about the three default widgets that are included in the sidebar.php template. I would just simply copy the sidebar.php to the child theme, and then delete these widgets manually. After deletion of these widgets, you will be left with only the following code in sidebar.php <?php /** * The Sidebar … Read more

How to set the default value as the saved value once a form of widget is saved?

You need a corresponding function UPDATE to complete this. See the Widgets API on the codex: http://codex.wordpress.org/Widgets_API Below is their example. /** * Adds Foo_Widget widget. */ class Foo_Widget extends WP_Widget { /** * Register widget with WordPress. */ function __construct() { parent::__construct( ‘foo_widget’, // Base ID __(‘Widget Title’, ‘text_domain’), // Name array( ‘description’ => … Read more

looping widgets to organize bootstrap grids

Would each of the columns have the same corresponding bootstrap classes (col-sm-4 col-md-4)? If so, you can just add those classes to the <div> referenced in before_widget, like: register_sidebar(array( ‘name’ => __(‘Footer Top’, ‘roots’), ‘id’ => ‘footer-top’, ‘before_widget’ => ‘<div class=”footer_teaser %1$s %2$s col-sm-4 col-md-4″>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h3>’, ‘after_title’ => ‘</h3>’, )); … Read more

Allow different tags in widget titles

I did not understand what you are doing in the function. See below example how title can be wrapped in the html tag: function html_widget_title( $title ) { $output=”<span class=”icon-someicon”>”; $output .= $title; $output .= ‘</span>’; return $output; } add_filter( ‘widget_title’, ‘html_widget_title’ );

Instance not inserting data for widget

You’re using get_field_id in the name attribute of the “limit” field, where you should be using get_field_name. You’re actually using get_field_name for the name attributes of the other two fields. Try using name=”<?php echo $this->get_field_name( ‘wy_rssLimit’ ); ?>” instead of name=”<?php echo $this->get_field_id( ‘wy_rssLimit’ ); ?>” That should solve your issue. The return values of … Read more

Dynamically display font icons in widget

This is more a PHP question from what I can gather, but hopefully this will help or at least get you on your way. I am making a few assumptions here, like you already have FontAwesome called and working in your site for example. I am also not sure why you have 2x get_post_meta(); functions … Read more

New Widget are not showing

If you register a new sidebar widget area in a child theme, use this code in your child themes functions file: register_sidebar( array( ‘name’ => ‘Header Widget Area’, ‘id’ => ‘home-header-1’, ‘description’ => __( ‘Your Widget Description.’, ‘$text_domain’ ), ) );

Customise the Category Widget

You can use any of the parameters from wp_list_categories and the widget_categories_args filter You can style the output with these CSS selectors: li.categories { … } li.cat-item { … } li.cat-item-7 { … } li.current-cat { … } li.current-cat-parent { … } ul.children { … }