Creating author Specific page URL

Your example works if I delete the newline. So this should work: function add_my_rule() { add_rewrite_tag(“%args%”, ‘([^/]*)’, ‘args=”); add_rewrite_rule(“writer/([^/]*)’,’index.php?pagename=writer&args=$matches[1]’,’top’); } add_action(‘init’, ‘add_my_rule’);

autologin in wordpress when loged in non wp-site

Not tested, but try to do a post request via ajax. The file you call via ajax should look something like this: require( dirname(__FILE__) . ‘/wp-load.php’ ); $user = filter_input( INPUT_POST, FILTER_SANITIZE_STRING ); $pass = filter_input( INPUT_POST, FILTER_SANITIZE_STRING ); is_wp_error( wp_signon( array( ‘user_login’=>$user, ‘user_password’=>$pass ) ) ) ? die( -1 ) : die( 0 ); … Read more

How to execute a plugin on a single page only?

WordPress has a built-in function called wp_enqueue_script() which will allow a certain piece of JavaScript to be included in a page. If you’d just like to see that script on a particular page, you can conditionally call it from the theme file. For example: <?php if (is_page(‘home’)) { wp_register_script(‘custom_script’, get_template_directory_uri() . ‘/js/custom_script.js’); wp_enqueue_script(‘custom_script’); } ?> … Read more