Search Posts

Category: wordpress

solution when wp_redirect() function is not working

a simple solution, please read: If you are using  wp_redirect($url) in theme files, and it is not working add ob_clean() ob_start() in your function file on top. If using in plugin add ob_clean() ob_start() in the main plugin file on top. And make sure you have added exit() function after wp_redirect($url) Like this:

Change Your WordPress Username from phpMyAdmin

This method is a little bit complicated as it requires making direct changes to your WordPress database. We usually don’t recommend users to make direct changes to their WordPress database. However, in some cases you may not have any other option. Like for example, if you have forgotten your WordPress username and email address, then you will not be able to access the admin dashboard to change username. Using this method, you can find your […]

get WordPress posts from a single category using XML-RPC

You’ll create a plugin that implements a custom function as shown in Custom XML-RPC Methods in WordPress and install it on the target site.

The following is a test file in PHP


adding js to wordpress in element


Profile Builder pages with shortcodes

ou can use the following shortcode list: [wppb-edit-profile] – to grant users front-end access to their user profile (requires user to be logged in). [wppb-login] – to add a front-end login form. [wppb-logout] – to add logout functionality. [wppb-register] – register users via a front-end register form. [wppb-recover-password] – to add a password recovery form. [wppb-restrict]Content to restrict[/wppb-restrict] – to restrict blocks of content

Difference between update_user_meta and update_user_option

In layman terms there is no major difference! update_user_option() uses update_user_meta() internally. The only difference is update_user_option() prefix the option name with database table prefix + blog ID if you are in multisite and just table prefix if you are in single site installation. Take a look at the code of update_user_option()

    Your option name is prefixed with table prefix + blog ID (Only when ID is other than 1 and 0). […]

update user meta for multiple meta_key in wordpress

  WordPress doesn’t give a built in way to update multiple metas at once. Part of the reason for using their built in function is because filters and hooks can be registered to operate on the meta information. These won’t be called if you update them directly.


Next Page »