Patricia Ayers
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Cannot edit non-Toolset Pages – "Layout for Pages" screen dominates everything
Started by: Patricia Ayers in: Toolset Professional Support |
2 | 3 | 3 years, 4 months ago | ||
URGENT "WordPress caught a fatal error with one of your plugins, Toolset Types"
Started by: Patricia Ayers in: Toolset Professional Support |
2 | 8 | 4 years, 9 months ago | ||
How to hide the Fields and Views button from front-end forms
Started by: Patricia Ayers
in: Toolset Professional Support
Problem: Solution: /** * Remove Toolset buttons on front-end editors * * The filter works globally so you will need * to add a test, e.g. for page ID, to limit scope */ function tssupp_remove_toolset_buttons(){ // $post not available with init hook $postID = url_to_postid( $_SERVER['REQUEST_URI'] , '_wpg_def_keyword', true ); $target_pages = array( 10, 25, 66 ); // Edit for page IDs where to remove button if ( in_array( $postID, $target_pages ) ) { // remove the Fields and Views button add_filter( 'toolset_editor_add_form_buttons', '__return_false' ); } } add_action( 'init', 'tssupp_remove_toolset_buttons' ); Edit the code for the pages where the button should not be shown. The code could also be modified to, for example, hide the button on any non-admin pages. |
2 | 3 | 6 years, 3 months ago |