Convert hyphen to underscore in permalinks
it can be done easily without any codes or plugin just go to pages dashboard, click Quick Edit” which url you want to change. Now add underscore. Update and done
it can be done easily without any codes or plugin just go to pages dashboard, click Quick Edit” which url you want to change. Now add underscore. Update and done
If you’re only concerned about login links displayed on your pages, you should be able to modify the URL by hooking the login_url filter. This won’t redirect a user that types http://MYSITE/wp-login.php directly into their browser, but it should affect the login links displayed throughout your site. This is the example code from the login_url … Read more
The trouble is to do with how quick edit works – WordPress uses a hidden <div /> to generate the form, which will have already had select2 applied (and thusly, the positions already calculated). Your click event listener on the body won’t fire when you need it, since the core event handler for quick edit … Read more
I think you need to do the add_action( ‘wp_head’, ‘add_meta_tags’ , 10 ); in your functions.php instead of the template to get the function called. And it adds it then everywhere where you have wp_head(). So if you want to only call it content-share.php you need some conditioning logic like if (is_page_template(‘page-templates/content-share.php’)) { add_action( ‘wp_head’, … Read more
You could detect the $_SERVER[‘HTTP_REFERER’] variable to detect whether the page is requested from an external server. If so, then you should load an alternative header and footer using get_header() and get_footer(). You’ll need those calls to make sure all scripts and stylesheets are loaded, but you can remove the other content that make up … Read more
If you mean to attach it to any and all $_POST inputs in WordPress that’s probably falls under Bad Ideas. WordPress has some kinks in how it works with that data (for example it emulates “magic quotes” mode, long deprecated in PHP itself) and some cases of POST in WP are extremely heavy (saving menus … Read more
The user_register hook passes the parameter $user_id to your function. Get the login name after instantiating a user object with get_userdata( $user_id ). Update the assigned user role with wp_update_user. Alternatively, you can use add_role to assign the new role in addition to the currently assigned role instead of removing the currently defined role with … Read more
I haven’t tested your code, but I recently spent a few hours hacking something together to solve the same issue — making background images set via the WordPress customizer load responsively. Feel free to use / modify the code below to your needs, and send any questions my way. I’m not a PHP expert by … Read more
Even though this question may get down voted – because not enough information has been provided and it’s fairly easy to find tutorials elsewhere, I’ll help you out. In your functions.php file in your theme, you need to do this: add_action( ‘wp_enqueue_scripts’, ‘wp5849_scripts’ ); function wp5849_scripts() { if ( is_front_page() ) : wp_enqueue_style(‘TBDhome’, get_stylesheet_directory_uri() . … Read more
There’s a question and an answer regarding WP (auto) updates here, How To/What triggers a WordPress auto update? The answer also has a link to a blog post on how to force WordPress auto-update. Code snippet posted on the referenced blog, <?php // request-update.php require( dirname(__FILE__) . ‘/wp-load.php’ ); wp_maybe_auto_update(); ?> and php ./request-update.php Perhaps … Read more