Saltar navegación

[Resuelto] Bad design in Relationship metaboxes

This support ticket is created hace 3 años, 10 meses. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Stephen Vaughan hace 3 años, 10 meses.

Asistido por: Waqar.

Autor
Mensajes
#1961545
Screenshot-2021-02-21-at-12.54.59.jpg

I return to this point every year or so to highlight a design flaw in the UI of the metabox used in posts to connect related posts. You will see from the screen shot that I have manages to style out the the red Trash link under the post name on the left. But above the list the button for adding a new product can't be hidden because there is no distinctive class or id to remove it. The only distinctive thing to remove it is data-bind and as far I know there is no way way to work with this.

As another Toolset user, who found a very complex solution to this has pointed out, controlling wether these buttons appear or not should be settable by default in Toolset:

https://toolset.com/forums/topic/changing-the-connect-an-existing-post-button-in-the-relationship-fields/

On the linked subdomain for this ticket I have a candidate prototype site for an organisation that will potentially hire me to rebuild there site. As is the wont of some clients, they want to be able to work on all content and with some trepidation I am working on ways to make the site fool proof. From experience, I know that it is inevitable with users who have fleeting experience with WordPress that invariably sites get messed up. The plan is that in some instances interns may be working on the site and as night follows day I will expect calls where a parent in a many children relationship will be deleted or, a duplicate added, leading in database terms to inconsistencies.

This one needs to be addressed, even if the button is wrapped in some sort of class that we can target.

#1962187

Hi,

Thank you for contacting us and I'd be happy to assist.

I'll be happy to pass on your feedback about this internally and you can use the attribute CSS selector in this case:
enlace oculto

For example, the following CSS code will hide all input elements where the "value" attribute starts with "Add new", within the div with the class "types-related-content-actions":


.types-related-content-actions input[value^="Add new"] {
display: none;  
}

regards,
Waqar

#1962313

Thanks Waqar.

That worked perfectly for me. I feel that the set up is a lot more safer now and complies with database design.