Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 859295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:39:45+00:00 2026-05-15T08:39:45+00:00

I have used the remove_action function in WordPress before to remove junk from the

  • 0

I have used the remove_action function in WordPress before to remove junk from the injected by wp_head but it seems that with version 3.0 some tags aren’t being removed like the one below:

remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );

This should remove the prev link tag but it isn’t. Anybody knows the reason?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:39:45+00:00Added an answer on May 15, 2026 at 8:39 am

    Thanks to TheDeadMedic I found the solution in “wp-includes/default-filters.php”. The following removes the next and prev links from wp_head:

    remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
    

    This is the full script for removing all “unnecessary” meta tags from the <head>:

    //remove_action( 'wp_head',             'wp_enqueue_scripts',            1     );
    remove_action( 'wp_head',             'feed_links',                    2     );
    remove_action( 'wp_head',             'feed_links_extra',              3     );
    remove_action( 'wp_head',             'rsd_link'                             );
    remove_action( 'wp_head',             'wlwmanifest_link'                     );
    remove_action( 'wp_head',             'index_rel_link'                       );
    remove_action( 'wp_head',             'parent_post_rel_link',          10, 0 );
    remove_action( 'wp_head',             'start_post_rel_link',           10, 0 );
    remove_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
    remove_action( 'wp_head',             'locale_stylesheet'                    );
    remove_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
    //remove_action( 'wp_head',             'noindex',                       1     );
    remove_action( 'wp_head',             'wp_print_styles',               8     );
    remove_action( 'wp_head',             'wp_print_head_scripts',         9     );
    remove_action( 'wp_head',             'wp_generator'                         );
    //remove_action( 'wp_head',             'rel_canonical'                        );
    remove_action( 'wp_footer',           'wp_print_footer_scripts'              );
    remove_action( 'wp_head',             'wp_shortlink_wp_head',          10, 0 );
    remove_action( 'template_redirect',   'wp_shortlink_header',           11, 0 );
    
    add_action('widgets_init', 'my_remove_recent_comments_style');
    function my_remove_recent_comments_style() {
        global $wp_widget_factory;
        remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a short program that is used exclusively with a remote desktop connection
I have used traditional version control systems to maintain source code repositories on past
I have used the XML Parser before, and even though it worked OK, I
I have an action that takes in a string that is used to retrieve
I have an object that is used between all my viewControllers so I have
Possible Duplicate: Prevent Back button from showing POST confirmation alert I have used the
I have used sp_addlinkedserver to access the remote machines db now i am writing
I have used IPC in Win32 code a while ago - critical sections, events,
I have used Photoshop CS2's Save for Web feature to create a table of
I have used this in my HTML: <q> Hai How r u </q> Which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.