Tag Info

Hot answers tagged

5

In general you don't want to modify plugins, because you will loose your modifications next time you update them. It's a little bit different for themes, where you can set up a child theme. If the plugin is using the wp_mail() function to send out the emails, you might try to use the wp_mail filter to change the recipients. Try to write your own plugin to ...


4

The most important question which you must ask yourself is Am I the author of the theme or plugin?. If your answer is yes, and you are responsible for the up keep of the plugin or theme, go ahead and change it and modify as you like. If your answer is no, then you should not make any changes to it, not even a small thing as a simple dot .. The same goes for ...


3

First, like many things in WordPress, it's not like someone decided "let's make this neat and convenient". It was more like someone slapped it together for something, then it got used more in admin, then it got used a lot in admin, then it became kind of practice to use it for non-admin as well. Or something along these lines. Second, it's not as much what ...


2

I got the following tutorial a very good start for a widget creation: How to Create a Custom WP Widget — WPBeginner And I used the tutorial and made my own first widget for my plugin. You can get all my code here in Github.


2

I think those of us who have been working with Wordpress for a few years have been guilty of doing this at one stage or another. I have had to make modifications to a plugin that was no longer being supported by the original author and had some compatibility issues with later versions of Wordpress. There are situations where editing an existing plugin ...


1

For reference, you may want to read the update_option documentation. The arguments you are passing are completely unrelated. However, your third technique is the closest, you have to update all the options in the the update_option call, not just the one option you want. This is because of how the plugin is storing it's options as an array rather than ...


1

First of all, the_content is a filter hook and not action. Secondly, it will only work when post content will be access on your site front end. You can probably make use of global variables instead. e.g. $options = get_option( 'wpglobalsettings' ); and then use wherever you want to access as follows - global $options;


1

Template filters have to return the name of a template file, not content. Their purpose is to override template selection with a different template. If you want to modify the content output within the content of a template, then you need to add a filter to the_content. function my_the_content_filter( $content ) { global $post; if ...



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