- This topic has 3 replies, 3 voices, and was last updated 3 years, 4 months ago by
Fernando.
-
AuthorPosts
-
November 26, 2022 at 6:45 pm #2436507
Martin
I currently have a WordPress e-journal membership site at https://mr.math.ca/article/ which offers pdf’s of articles to logged in users. It uses Genesis and Toolset with Restrict Content Pro (RCP) and Download Monitor.
I would like to convert it to GeneratePress and GenerateBlocks (GB) and stop using Toolset for custom post types and custom fields and views. (because Toolset has stopped development on their plugins).
My question is if you can recommend an alternative to Toolset for custom posts, custom fields and views. I was looking at your GB with the new query block and it looks like you support dynamic custom fields from custom posts.
I was also wondering if you know of any plugin which might be similar to Toolset’s Access plugin to control access of only logged in users to certain custom fields (like a custom field with the link to the downloadable pdf which I would like to hide). In this way, I am thinking of trying to also get rid of my dependence on RCP and Download Monitor.
Looking forward to any advice you might be able to offer.
November 27, 2022 at 4:41 am #2436904David
StaffCustomer SupportHi there,
just to note regarding GenerateBlocks and its dynamic data, currently it does not support Repeater Fields ( nested fields, sub fields etc. ). If thats not a requirement then you should be able to create the front end templates using the GP Block Elements with GenerateBlocks.
Which leaves:
1. Registering the Custom Post Type
2. Registering the Custom Fields
3. Restricting access to logged in usersFor #1 and #2 i would probably hard code the CPT, and use either ACF or Metabox to register the Custom Fields as those simplify adding the necessary metaboxes in the editor.
Alternatively you could build the CPT and CFs using PODs.io – which once you get your head around it, is greatThat leaves #3. A simple solution could be achieved using GP Elements, as it has Logged In and User role display rules.
Let me know thoughts on the above, and whether the simple dynamic data handling from GB would suffice.
November 28, 2022 at 1:45 pm #2439848Martin
Thanks for your detailed reply. A few followup comments/q’s:
1. I do not use repeater fields, so that should be ok using GenerateBlocks.
2. I like the all-in-one approach of PODS – are PODS fields auto integrated with GenerateBlocks or do I need to buy their pro add-on? https://pods-pro.skc.dev/downloads/page-builder-toolkit/
3. If I want to restrict the front-end display of a link to the downloadable pdf for logged in users only, can I do that with GP Elements? My understanding was that GP elements restricts a part of a page (like sidebar or header) but not some text or fields in part of the content template? I want to display a message for non-users (“download is restricted to paid users only”) and otherwise show the link field for logged-in users … maybe one way to do that would be to show an entire separate content template for logged-in users vs non-logged in?
thanks again
November 28, 2022 at 5:44 pm #2440128Fernando Customer Support
Hi Martin,
2. PODS fields should work with GenerateBlocks free version. You don’t need the Pro version. To automatically show the Post Meta field names as an option in the Dynamic Data, you’ll need to enable/allow Show in Rest API for the fields. If this doesn’t show the fields automatically, you can manually set the Content Source to “Post Meta”, and the field name to the PODS field name. This should work.
3. There are two different approaches here. For one, you can create a portable Hook, and add it to your “section”. Now you can create a new Block Element for your “restricted” Block, and hook it to the Portable Hook. Through this, you can use the User settings in the Display rule location.
Example Portable hook: https://generatepress.com/forums/topic/hooks-related-question/#post-2170598
Another approach is through custom code.
-
AuthorPosts
- You must be logged in to reply to this topic.