-
AuthorPosts
-
December 22, 2018 at 10:34 pm #1048701
After updating to WordPress 5.0.2 and Enfold 4.5.2 the tag “Advanced Layout Builder” now appears after each page title in the list of All Pages.
How can I disable this irritating new “feature”…??
December 23, 2018 at 2:04 am #1048727Additional Information
The words “Advanced Layout Builder” can be removed with a css override setting the display attribute of the post-state class to “none”
but because the long dash in front of the words is not styled with css, the long dash cannot be eliminated with a css override.Can you point me to where in the code Page Title in the list of All Pages is built…??
December 23, 2018 at 3:14 am #1048732Even More Information
I now believe the irritating tags are being added by the Classic Editor plugin which I installed before I knew I did not need it with Enfold 4.5.2 — I uninstalled and deleted the plugin but the problem remains so I will try rebuilding the site.
December 23, 2018 at 11:58 pm #1048935Cause of Problem Identified
The cause of the problem is lines #649-652 of class-avia-gutenberg.php in the ../enfold/config-gutenberg directory which adds the phrase “Advanced Layout Editor” as a post state so it appears as part of the post title in the list of All Pages.
Is there a filter hook available to override this behavior or some other way to remedy the problem…??
December 24, 2018 at 2:42 am #1048946Update
I tried using the display_post_states filter hook…
add_filter(‘display_post_states’,’adjust_post_states’,10,2);
function adjust_post_states($post_states,$post) {
// do something //
return $post_states;
}…with two versions of the “do something” line…
Version #1 = $post_states[‘avia_alb’] = ”;
Version #2 = unset($post_states[‘avia_alb’]);Neither worked.
What is the proper coding of the “do something” line to get this code to work…??
December 29, 2018 at 2:27 pm #1049169Hi solidvapor,
Here is a thread for you to consider
https://wordpress.stackexchange.com/questions/220164/how-to-remove-dash-post-status-from-post-title-on-posts-listing-page-wordpre/220167#220167If you need further assistance please let us know.
Best regards,
VictoriaJanuary 2, 2019 at 8:38 pm #1049366I found the solution but could not post it because the forums were closed…
add_filter(‘display_post_states’,’remove_ALB_post_state’,999,2);
function remove_ALB_post_state( $post_states, $post ) {
if( ” != Avia_Builder()->get_alb_builder_status( $post->ID ) ) {
unset($post_states[‘avia_alb’]);
}
return $post_states;
}January 3, 2019 at 7:12 am #1049503Hi,
Great, glad you found a solution and thanks for sharing :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardJanuary 3, 2019 at 11:58 am #1049578Hi,
i found some mistakes in your solution.
This is the right one!add_filter(‘display_post_states’,’remove_ALB_post_state’,999,2);
function remove_ALB_post_state( $post_states, $post ) {
if(“!= Avia_Builder()->get_alb_builder_status($post->ID)”) {
unset($post_states[‘avia_alb’]);
}
return $post_states;
}Regards
BiggyJanuary 3, 2019 at 3:20 pm #1049618Biggy:
Your “corrected” code appears to work but so does the original code.
You misread the beginning of the if condition as a quotation mark — it is actually two apostrophes and is an exact copy of line #649 in class-avia-gutenberg.php
March 3, 2020 at 2:37 pm #1189743Thanks for the solution!
This unnecessary entry made working with important entries such as “Private” really confusing.Regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.