Home › Forums › Support › Conditionally enable and disable in a post type the WordPress Meta field: editor
- This topic has 5 replies, 3 voices, and was last updated 6 months, 4 weeks ago by
David.
-
AuthorPosts
-
August 29, 2022 at 11:37 pm #2327942
JUAN LUIS MARTEL REVUELTA
Hello good morning.
First of all I want to thank you for all the good things I have achieved using this theme.
Since July 25, 2016 I am a happy user of GeneratePress.
In very bad and sad moments of my life Generate Press has helped me to earn money using Black Hut Seo and also making websites for clients.
I have never had any problems with this theme, I have installed and used many other themes, but eventually I always come back to Generate Press because it works perfectly well and I never have any problems.
I am not a programmer and I always solve my doubts searching in google, but this doubt I can not solve it.
I want to know if this can be done:
I need to conditionally enable and disable in a post type the Meta field: editor, but using “Generatepress Elements“.
I want “from elements” to be able to disable the wordpress Meta field: editor for logged in users and enable my custom Meta field type WYSIWYG for logged in users.
Unlogged user: only see WordPress Meta field editor (block editor)
Logged in user: only sees JetEngine Meta field type WYSIWYGHow do I disable in a Custom Post Type the WordPress Meta field editor from elements?
Thank you very much to all the team, and sorry for my language.
August 29, 2022 at 11:48 pm #2327950Fernando Customer Support
Hi Juan,
Can you share temporary login credentials, and a link to where we can see both the WordPress Meta field editor and JetEngine Meta field type WYSIWYG?
We’ll see how we can best approach this.
August 30, 2022 at 2:05 am #2328074JUAN LUIS MARTEL REVUELTA
The website is very large and is under development.
I am removing a LMS to use only wordpress.
I don’t know how to get to that place.
Here is an example of my elements hook:
<?php if ( is_user_logged_in() ) { echo do_shortcode("[reblex id='566']"); // Shortcode Showing Jetengine WYSIWYG field plugin: Reusable Blocks Extended This is OK } else { echo '<h1>HOLA MUNDO</h1> '; // ¿your code for the logged-out user, which displays the wordpress editor? } ?>
I need to put in the else:
a- Show wordpress editor to logged out users. I don’t know how to do this
I need to put in the if:
b- Hide wordpress editor to logged in users. I don’t know how to do this
c- I have a short-code that displays the Jetengine WYSIWYG field to login user. This is OK.I have another option:
Disable the wordpress editor and use two custom fields WYSIWYG, but I would like to leave the wordpress editor.Thank you very much for responding so quickly, sorry if I don’t express myself well, I don’t speak English well.
August 30, 2022 at 5:50 am #2328224David
StaffCustomer SupportHi there,
the Elements module is not able to do that.
The Elements module is only for controlling what is displayed on the front end in the GP Theme templates.I need to put in the else:
a- Show wordpress editor to logged out users. I don’t know how to do thisThis I do not know how it is possible.
I have another option:
Disable the wordpress editorSee this article:
https://stackoverflow.com/a/52199630
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 30, 2022 at 10:28 pm #2328976JUAN LUIS MARTEL REVUELTA
Thank you very much for the information.
This talk was an eye opener for me.
I am going to make a conditional with two shorcodes.
One shortcode shows the public content, and the other shortcode shows the private content.
It is simpler.Again thank you very much for the input.
A big hug to all the team.
August 31, 2022 at 1:11 am #2329099David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.