Skip Navigation

[Résolu] Hide Quick Edit and disconnect Link from Child Post table

This support ticket is created Il y a 6 années et 2 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Laura Il y a 6 années et 2 mois.

Assisté par: Laura.

Auteur
Publications
#1118117
image001.png

I have Created a relationship between Obituary->Service (1:M) . In Edit Obituary table I am Displaying all the Services. So From Service Post table I want to remove Quick Edit and Disconnect Link.

Please find and attachment of the Image.

#1118212

Laura
Supporter

Les langues: Anglais (English )

Hi,

at the moment there is no native way to hide the links unless you use some custom CSS or JS to hide them.
You can try this code to your theme's functions.php file to remove all links, just be sure to substitute “post-type-slug” with your own slug:

add_action('admin_head', 'func_hide_related_posts_links');
function func_hide_related_posts_links() {
	
	  if( get_post_type() === 'post-type-slug' ) {
  echo '<style>
  td.column-post-field .edit {
	  display:none;
  }
  td.column-post-field .delete {
	  display:none;
  }
  
     
  </style>';
	  }
}


Let me know if this works for you.