-
AuthorPosts
-
January 25, 2023 at 10:22 am #1395100January 25, 2023 at 12:36 pm #1395132January 26, 2023 at 3:24 am #1395272
All website have the shortlink, not a plugin problem
January 26, 2023 at 5:36 am #1395290Hi yundian,
You are correct, shortlink is added by WordPress that’s why it’s in every site.
To remove it, please add this code:add_filter('after_setup_theme', 'avia_remove_shortlink'); function avia_remove_shortlink() { remove_action('wp_head', 'wp_shortlink_wp_head', 10); remove_action( 'template_redirect', 'wp_shortlink_header', 11); }
Best regards,
NikkoJanuary 26, 2023 at 9:22 am #1395327I have add the code:
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’);
to remove the shortlink.
If it is the same function as yours?
And, I also try to remove the profile and pingback links, what code should I add?
January 27, 2023 at 4:03 am #1395495Hi yundian,
Yes, it’s the same function, you can remove that code as well as the code I gave and replace it with:
add_filter('after_setup_theme', 'avia_remove_shortlink'); function avia_remove_shortlink() { remove_action('wp_head', 'wp_shortlink_wp_head', 10); remove_action( 'template_redirect', 'wp_shortlink_header', 11); remove_action( 'wp_head', 'avia_set_pingback_tag', 10, 0 ); remove_action( 'wp_head', 'avia_set_profile_tag', 10, 0 ); }
Hope this helps.
Best regards,
NikkoJanuary 27, 2023 at 8:44 am #1395536Thanks, it is working
Also find a bug in logo link, there is a blank title, how to fix it or remove it.
January 27, 2023 at 2:37 pm #1395587Hi yundian,
I think the title isn’t supplied that’s why it looks like that.
Just supply it with a title and that should show up just fine.Best regards,
NikkoJanuary 28, 2023 at 2:47 am #1395689January 28, 2023 at 8:17 am #1395696Hi yundian,
Hmm, can you try adding this code in functions.php (just change the value of the title):
function avf_change_logo_title($title) { $title = "Logo"; return $title; } add_filter('avf_logo_title', 'avf_change_logo_title');
Hope it helps.
Best regards,
NikkoJanuary 28, 2023 at 8:30 am #1395698Hi,
The code let the title value change to “Logo”, how to change the title to “云点SEO”?
January 28, 2023 at 8:41 am #1395702Hi yundian,
Please replace the last code I gave to:
function avf_change_logo_title($title) { $title = "云点SEO"; return $title; } add_filter('avf_logo_title', 'avf_change_logo_title');
Hope this helps.
Best regards,
NikkoJanuary 28, 2023 at 10:04 am #1395708perfect, many thanks, please close
January 28, 2023 at 12:14 pm #1395709Hi,
Glad Nikko was able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘How to remove the shortlink’ is closed to new replies.