Changing WordPress core without hacking core

It is possible to set the site URL manually in the wp-config.php file. Add these two lines to your wp-config.php, where “example.com” is the correct location of your site define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); or Edit Functions.php update_option( ‘siteurl’, ‘http://example.com’ ); update_option( ‘home’, ‘http://example.com’ ); Try this Let me know any issue persist.

Hook when editing user

Yes, this is CORRECT add_action(‘edit_user_profile’, ‘limpiamosVariables’); function limpiamosVariables($user){ // My Code Sample update_option( “var_ios_token”, get_field(‘token_user’, ‘user_’.$user->id) ); };

Make an array filterable per hook

If you want to make the array filterable, use apply_filters() and add_filter(). Also, you have to pass the array as an argument to apply_filters() and expect it in your callback that is changing that array. Here is a basic example with slightly more meaningful names: First we have a function that is running over an … Read more

When are wp redirect methods safe to hook?

I’ve been going through action hooks and the earliest I’ve gotten it to work properly with my conditions for user and page type conditions is the wp action. Although, I am currently hooking it into template_redirect as it seems most appropriate and intended for this purpose according to the codex: It is a good hook … Read more

Adding a hook to the default (page.php) template

if you want modify the content, there is the filter the_content. if you want to intercept the template file before it is included : filter template_include to catch a shortcode (like Visual Composer e.g.) : filter do_shortcode_tag and the filter vc_shortcode_output for only the shortcodes of Visual Composer