Populate Website URL at registration time

A few things come to mind… 1) Do users have to activate their accounts? If they do, it’s quite possible that users who haven’t activated yet are the users who don’t return an author URL 2) If this is occurring for all users, that shouldn’t matter since you already know what the expected URL is … Read more

Issues with WordPress permalinks

This is a typical issue when moving WordPress sites. WordPress stores URLs – both main configuration URLs and resource URLs – in the database. These must be changed in the database when moving to a new domain or mail URL in localhost. Don’t use simple SQL change queries in the database via adminer or phpmyadmin. … Read more

Is It Possible To A Link To The Homepage From The Admin Sidebar?

The $location parameter was incorrect. Try this: function redirect_to_local_110(){ wp_redirect( home_url() ); exit; } function add_home_link() { add_menu_page( ‘Course’, ‘Course’, ‘read’, ‘home’, ‘redirect_to_local_110’, ‘dashicons-welcome-learn-more’); } add_action( ‘admin_menu’, ‘add_home_link’, 1001 ); Or you could use this: function redirect_to_local_110(){ wp_redirect( ‘http://www.example.com’, 301 ); exit; } function add_home_link() { add_menu_page( ‘Course’, ‘Course’, ‘read’, ‘home’, ‘redirect_to_local_110’, ‘dashicons-welcome-learn-more’); } add_action( … Read more

remove custom post type ulr

Your issue is related to your use of feed, which is both a reserved keyword, and an existing URL rewrite. e.g. RSS feeds etc: example.com/feed/rss2 You need to change your rewrite rules to use something other than ‘feed’ in your URL. The same goes for any taxonomies or post types that try to call themselves … Read more

Add custom field to post with some part of url as value

I found this solution, it works great. I will share it here if someone else need it. $currenturl=”http://” . $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’]; $id = $post->ID; if ( preg_match(‘/\?(.+)$/’, $currenturl, $matches) ) { $value = urldecode($matches[1]); add_post_meta($id, ‘my_new_custom_field_name’, $value, true); }