[Resolved] Conditionally enable and disable in a post type the WordPress Meta field: editor

Home Forums Support [Resolved] Conditionally enable and disable in a post type the WordPress Meta field: editor

Home Forums Support Conditionally enable and disable in a post type the WordPress Meta field: editor

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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 WYSIWYG

    How 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.

    #2327950
    Fernando
    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.

    #2328074
    JUAN 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.

    #2328224
    David
    Staff
    Customer Support

    Hi 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 this

    This I do not know how it is possible.

    I have another option:
    Disable the wordpress editor

    See this article:

    https://stackoverflow.com/a/52199630

    #2328976
    JUAN 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.

    #2329099
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.