-
Hi all,
is “deactivate elements” a GeneratePress function or is it part of WordPress?
I have deactivated the featured image on my pages as I use an own function to display it.
The page was automatically translated with WPML. The “Featured Image” checkbox was unchecked in the translation. However, the “Post Title” box remained ticked.
Why does the translation change this setting? And left the other unchanged?
Thank you.
Regards
Michael -
Hi Michael,
Do you mean this?
https://docs.generatepress.com/article/disable-elements-overview/If so, yes, it’s GP Premium’s option.
Why does the translation change this setting? And left the other unchanged?
I don’t know, unfortunately.
-
Yes. The tick for „Featured Image“ disappeared, the tick for „Content Title“ remained.
-
Fernando
Hi Pixx,
I’m uncertain as well how a Translation plugin would affect that setting. Does it recreate the page? Could you try using a Layout Element instead to disable the Featured image? Reference: https://docs.generatepress.com/article/layout-element-overview/#disable-element
Let us know how it goes.
-
Nice. This works to remove the featured image on all pages.
For usability and comprehensibility, however, it is unfavourable that the box on the respective page is not ticked accordingly. Anyone who does not know about the global setting could be confused.
Is there a way to remove the elements box from the individual pages/posts in the backend?
-
Fernando
Technically, a Layout Element removes it from the backend via PHP.
Conceptually, it works like this:
add_action( 'after_setup_theme', 'tu_remove_title' ); function tu_remove_title() { add_filter( 'generate_show_title', function(){ if(is_single("292")){ return 0; } }); }
-
The WPML support tells me to enable the translation of user defined fields. There is a long list where I should choose.
What is the right field here? _generate_element_exclude_conditions? _generate_element_display_conditions? _generate_disable_featured_image? Something else?
They all have padlocks. _generate_disable_title has no padlock and this setting survived the translation.
-
Fernando
Try these:
_generate-disable-top-bar _generate-disable-header _generate-disable-mobile-header _generate-disable-nav _generate-disable-headline _generate-disable-footer
-
These are not in the list that WPML offers me.
-
Hi there,
GP Premium provides the
<wpml-config>
file in the root of the plugin folder, its titled:wpml-config.xml
WPML should handle that as per this article:
https://wpml.org/documentation/support/language-configuration-files/The featured image field is:
_generate_disable_featured_image
- You must be logged in to reply to this topic.