Won’t a filter on widget_title
do this?
function widget_title_wpse_206841($title,$instance) {
// var_dump($instance);
if (!empty($instance['subtitle'])) {
$title .= ' something '.$instance['subtitle'].' something ';
}
return $title;
}
add_filter('widget_title','widget_title_wpse_206841',10,2);
Related Posts:
- How can I modify the WordPress default widget output?
- How to hook into unregistering a widget instance?
- Filter Widget Title Wrap
- Is it possible to remove the filter from 4.8 text widget?
- Anyway to edit the titlebar of WordPress Widgets in the Admin area?
- WordPress tag cloud add more links
- How to add a class to Tag cloud widget link?
- How to make a widget expand wider than the column width when editing its settings in the admin
- Warning: Missing argument 2 for widget_title filter
- Add Bootstrap Classes to Recent Posts Widget
- include specific Pages to wp_list_pages with filter
- Shortcodes within the sidebar text/html widget: How to preserve the raw HTML output of the shortcode?
- Archive Widget – Count only parent posts
- Widget image reorganize layout
- How can I change the button text of a custom widget?
- WordPress Tag Cloud Filter Prevents Widget HTML from loading
- How can I add a prefix to titles displayed in sidebar using function.php?
- Filter WordPress Archive Widget to exclude posts with specific custom taxonomy term id
- Output dynamic_sidebar_params in wp_head
- Filter on widget-title does not work with custom links
- How to use apply_filters(‘get_calendar’) to change get_calendar() output?
- Filter widget_pages_args not working in Pages Widget
- Add custom options to the wplink dialog
- Filter specific shortcode output?
- Insert new element to array with add_filter
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- How can I filter Microsoft Word gunk from pasted content?
- Shortcode from a widget is wrapped in unwanted element
- How to disable all WordPress emails modularly and programatically?
- Allow Profile HTML for select users
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- WordPress 3.5+ upload tool filter
- Search with filters and title
- Filter all html output
- How can override a add_filter of a plugin?
- failed to filter hook `get_terms_defaults`
- Nested calls the the_content filter
- Filter list by a unique meta value dilemma
- How to use shortcode attribute in separate function
- Is it possible to track down Actions and Filters?
- How to filter a wordpress core function?
- Adding id and class to the search input in WordPress search form
- get_bookmarks filter not supplying query argument (wp 3.1)
- Filter and modify entry-footer link in twentyseventeen
- Filter Posts by current Month
- Are there actions or filters I can use for Ajax calls?
- How to filter for user registration, be able to throw error message
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- How to prepare WordPress Rest data for Preview Changes?
- Admin filter for product SKU?
- Contact Form 7: Make field required after checkbox is checked
- Customize title, description and focused keyword [closed]
- Filter pre_get_posts does not modify Mine/All/Pending
- wp_mail works with add_action(‘save_post’, …) but not an ajax action
- Can i use multiple ‘the_content’ filters?
- Is it possible to put the add-filter()-hook into a function?
- How can I return shortcode output to the top of the content?
- Filter for when the post is updated
- term_link filter gives less atributes
- Filter a pluggable function
- Add mime types with plugin
- Filter media upload attachment meta
- Filter have_posts()/ the_post()
- Filter wp_redirect() to stop redirect under certain condition
- How to add filter in custom rss feed
- Shorten the title length
- Hook in a sidebar widget and add some markup
- preg_match() not working with post content
- Search a title word through query_posts (not the exact match)
- Elementor Image Hover + Filter Grid [closed]
- ‘manage_users_custom_column’ is a filter, but ‘manage_posts_custom_column’ is an action. Why?
- comment_notification_text filter not working
- Line Breaks are stripped off when direction property is found
- Scanning for custom embed and prefetching
- WordPress remove_filter not working
- How to exclude or include categories in wp rest API without query parameters?
- Remove and replace woocommerce add to cart button [closed]
- Hook to change the site URL
- Replace a specific URL on all apperances on the Website (Maybe a filter?)
- Strange behaviour of REGEX in a WordPress filter (trying to suppress emtpy paragraphs)
- Modify Contextual Help
- WordPress set featured image to first image of the post
- Modify WordPress search behaviour in backend?
- Re-order search results with posts_orderby filter and post meta value
- Testing requested query in pre_get_posts
- Converting restricted html in comments to bbcode
- What is the proper/best way to have multiple add_filter for wp-job-manager-resume
- Modify WooCommerce email shipping text value
- Using Filters To Change Page Title
- using posts_where for meta data on pre_get_posts
- can’t output gray scaled image I’ve created using add_image_size
- How properly write function to filter content in a template for plugin “multiple content blocks”
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?