-
AuthorPosts
-
January 5, 2021 at 5:45 am #1270316
we have members in our site that are given specific roles. We want to be able to create a page in enfold and then have the content on that page display if a user is of a specific role type.
We have managed it with WPMembers code within a text content block but ideally want to show or not complete sections depending on the user logged in.
January 5, 2021 at 9:05 am #1270334I use the Members plugin that allows you to set permissions to protect/show post/page content based on the user role.
January 5, 2021 at 9:45 am #1270338Yes I use that as well but it only controls content at a page level and I am hoping to control it on page level. Make this color section show and this one not kind of thing
January 5, 2021 at 9:56 am #1270344Ah. In that case, how about: https://wordpress.org/plugins/content-control/
Content Control allows you to do the following:
– Display certain content on a page/post to logged in users only
– Display certain content on a page/post to specific user roles
– Display certain content on a page/post to logged out usersJanuary 5, 2021 at 11:03 am #1270349Thanks, wpmembers does something similar but how can you wrap say a color section or cell within short codes in enfold?
January 5, 2021 at 12:04 pm #1270367You can add the following code to the functions.php file of the child theme to show the raw html in a field at the bottom of the edit page/post, below the ALB builder. Then, add your shortcodes(?) to wrap the required html:
/*set builder mode to debug so html code is visible*/ add_action('avia_builder_mode', "builder_set_debug"); function builder_set_debug() { return "debug"; }
Or, I guess you could try disabling the ALB builder to show the raw HTML and add your shortcodes(?) that way.
January 5, 2021 at 12:51 pm #1270382Legend!! That worked a treat. Now you can control any avia element for a specific user role display on the page. Thank you.
ps. got an answer for my other query ;) https://kriesi.at/support/topic/progress-bar-number/
January 5, 2021 at 1:55 pm #1270399Excellent. Regarding your other query, that probably requires a custom plugin to be developed.
January 6, 2021 at 3:51 am #1270497Hi,
Thanks for helping out @Barnez1, it’s much appreciated :-)
Please let us know if you should need any further help on the topic @smakarate.
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.