You just changed the default value for $top_text
. Modifying a plugin directly like that is not a good idea, because the changes will be lost when updating.
There’s quite a bit more code in that plugin, and going through it, I see that there is an options page where that value is set. It seems like you should just change the value of the caption text to <h3>THIS IS NEW CAPTION:</h3>
there.
It is possible to alter option values programmatically, so you should be able to add this to your functions.php
to alter the value on the fly:
function wpse241711_related_posts_thumbnails_filter_top_text( $top_text ) {
return '<h3>THIS IS NEW CAPTION:</h3>';
}
add_filter( 'option_relpoststh_top_text', 'wpse241711_related_posts_thumbnails_filter_top_text' );
Related Posts:
- How to echo the_excerpt without the P tag wrapper?
- How can I update a wordpress plugin from a Git repository (github)
- Is There a Plugin Life Cycle Documentation?
- What is the difference between $post_id and get_the_ID()?
- Where to store plugin settings fields
- What is an alternative method to the WordPress private _doing_it_wrong() function
- How can I add columns to the post edit listing to show my custom post data?
- Shortcode adding p and br tags
- Custom frontend page for plugin without a ‘physical’ page?
- Using AJAX in a plugin to submit form – REALLY confused
- Plugin Architecture/Design Pattern – is better to use a private Observer/Mediator Pattern for plugin subclasses or WP add_action?
- Install and load additional plugins when running unit tests
- Having Problem On Getting WP Post Gallery Images URL
- Post added via wp_insert_post with category doesn’t show in category listing
- How to add more than 1 user role to sub-menu pages
- How to get shortcode to work inside a foreach loop called within a shortcode?
- How to properly use a hook to create template for custom product type in a plugin such as Woocommerce? [closed]
- How do I hook a custom discount to change a WC_Order price total on WooCommerce?
- Using a front controller in a WordPress plugin, any suggestions?
- How do I determine if a category exists by ID?
- Properly licensing a plugin that uses Apache 2.0 licensed code
- Use theme constants in plugin?
- Can I dynamically create a link to my plugin settings/options page from my plugin description?
- How to load the plugin only when logged in?
- Self-hosted plugin update problems
- How to avoid creating first submenu page that is same as menu page?
- Hook into theme-switching later than `setup_theme`
- Save image as featured image
- Best choice of options/settings framework for plugin/theme development
- WP AJAX is not working, always returns 0
- GET parameters interfere with my plugin settings
- Act on user meta updated, but only once
- get_pages Drop down list for selection of a page
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Hide plugin dashboard menu item for specific roles
- How to use relative path with my plugins folders?
- How do I add custom column to woocommerce cart?
- Files automatically added
- WordPress mode for emacs?
- Widget translation on my plugin
- Upload to a remote server using wp_remote_post
- Make WordPress cache permanent for some pages until edited
- conditionally load javascript & CSS for do_action() calls from plugin
- The plugin does not save data
- How do I create plugin or theme using MVC pattern?
- Create custom HTML/JS app inside page
- Plugin Development for registered users
- tinymce.get() returns error after ajax request
- Widget options are not updated
- Access bloginfo, get_option, and plugins_url from a non-core php file
- Upload multiple images and insert them into custom html code
- Do blocks replace plugins in WordPress 5?
- How to get a list of child ids for a named category?
- Plugin could not be activated because it triggered a fatal error, unexpected ‘[‘
- Show dynamic list of products from custom api of another database under same host
- Hide custom post type by user roles
- Custom avatars in wordpress comments?
- Admin Subpages without Menu entry
- $wpdb->update() always need a second try
- Why aren’t some plugin styles loading when I load a template?
- How to create custom dynamic url
- Pagination not working with custom wp_query
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- How to get the number of pages when paginating comments?
- WordPress actions for plugin admin UI page
- wp_insert_user keeps echoing values
- Getting posts by taxonomy
- Pause plugin option page until all data manipulation is complete
- can members have multiple registration using the same password?
- Exclude Woocommerce Product Category From Sitemap
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- How to show only the last two categories in a menu?
- Get API auth_token token to renew weekly
- howTo let wordpress endpoint return html-page
- Detect if requested page is PWA on server side
- User meta query using Wildcard
- use a (Polymer) web component within a plugin (or theme)?
- how to add security questions on wp-registration page and validate it
- Allow user to add the php code in wp_mail()
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Hiding WordPress REST endpoints from public viewing using Basic Authentication
- Plugin setting page – update_option problem
- Customize WordPress Admin Menu
- Dedicated server and WPDB Class : huge slow-down of the website
- How can I see a varibles value when my plugin runs?
- Add Button to TinyMCE Custom Menu
- How should I use wpdb class to submit a form in admin dashboard?
- Rewriting URLs with a query string
- Forcing ALL plugin Admin menus into a separate menu
- WordPress plugin: admin-ajax.php not passing data to custom function
- Create pages for authors
- How do I create Widget within plugin that uses its own class?
- Looking for Hook that is fired after a plugin or wp upgrade is installed/updated
- How to display posts list on my plugin page?
- How to design WooCommerce-like admin tabs for plugin settings page?
- Woocommerce: block user removing cart item
- How can I dynamically change title and description in WordPress?
- WordPress pre-build slider
- Elementor Top-Bar
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?