how to redirect to a custom password retrieval page

not sure i really follow you either, BUT what about filtering the wp_lostpassword_url from wp-includes/general-template.php function wp_lostpassword_url( $redirect=”” ) { $args = array( ‘action’ => ‘lostpassword’ ); if ( !empty($redirect) ) { $args[‘redirect_to’] = $redirect; } $lostpassword_url = add_query_arg( $args, network_site_url(‘wp-login.php’, ‘login’) ); return apply_filters( ‘lostpassword_url’, $lostpassword_url, $redirect ); } looks like it has a … Read more

store simple data in get_option()

To recap the comment chain above: I think that’s a perfectly valid way of storing some options in the database, however, it’s good practice to prepend your option name with some unique characters pertaining to your site or something, like ‘my_simple_links’ to avoid possible collisions with other plugins and themes that add_options. Also, if you’re … Read more

How to create extendable wordpress plugins

The following: Use hooks and filters to power things. Pass args into a filter before doing things with them, pass return values to filters before returning them, etc, hooks and filters everywhere namespace everything, tomjn_twittercount is a better function name than twittercount Practice good common sense generic programming, e.g. use dependency injection, use proper OOP … Read more

Removing My Sites menu from Admin

You can use remove_submenu_page to remove it. Note that it doesn’t prevent visiting that page if you manually enter the URL. function adjust_the_wp_menu() { $page = remove_submenu_page( ‘index.php’, ‘my-sites.php’ ); } add_action( ‘admin_menu’, ‘adjust_the_wp_menu’, 999 ); Based on the example from remove_submenu_page Codex page.

how to use a different domain/subdomain for authors/catagories on single site?

wp-config.php if ( is_alt_domain( $_SERVER[‘SERVER_NAME’] ) ) { $domain = str_replace( ‘www.’, ”, $_SERVER[‘SERVER_NAME’] ); define( ‘WP_SITEURL’, ‘http://www.’ . $domain ); define( ‘WP_HOME’, ‘http://www.’ . $domain ); } else if (is_sub_domain( $_SERVER[‘HTTP_HOST’] ) ) { $domain = “{$_SERVER[‘HTTP_HOST’]}”; define( ‘WP_SITEURL’, ‘http://’ . $domain ); define( ‘WP_HOME’, ‘http://’ . $domain ); } else if (! (is_main_domain( … Read more

How to add ‘class’ attribute into shortcode [audio]?

WordPress allows least three options to manipulate the code to your needs. Use a global variable that you increment with @Jevuska ‘s answer. global $my_audio_player_count; $my_audio_player_count = 0; add_filter( ‘wp_audio_shortcode_class’, ‘wpse221201_audio_shortcode_class’, 1, 1 ); function wpse221201_audio_shortcode_class( $class ) { global $my_audio_player_count; $class .= ‘ my-audio-player-‘.$my_audio_player_count++; return $class; } Remove the built-in shortcode and add your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)