Tagged: #restricted
- This topic has 2 replies, 2 voices, and was last updated 2 years ago by ahiltonn.
-
AuthorPosts
-
15th November 2022 at 3:38 am #6739ahiltonnParticipant
Hey Andy,
I have a Member’s Only page with password access that I control with the Restricted Content Control code.
One of the tabs on that page has a series of blocks containing tables (using WordPress Table Builder) with committee members and their emails.My problem is this: It seems the scope of the restricted type declaration does not encompass all the blocks between the declaration and the [/church admin] SC. Thus, if I put the restricted declaration at the top of the page and the closing code at the bottom, I get the login form followed by the restricted content, which is not what I want.
The workaround would be to place the “restricted” declaration and the closing CR inside each block of the page. Unfortunately, then each block appears with the login form, and I get a mass of login forms on the page, which looks awful.
What I would like to do is show the login form once, then just use more short codes to hide the rest of the blocks. Is it possible to use the “restricted” declaration without instantiating the login form? Conversely, is it possible to have the scope of the restricted declaration span multiple blocks?
To see what I mean, you can look at https://menno.org/main-page/members-only/#1644989656702-b1a6db7e-787f
Regards,
Alan Hilton-Nickel
First Mennonite Church of San Francisco1st January 2023 at 9:43 pm #6824Andy MoyleKeymasterSorry for the tardiness in replying, the forum wasn’t sending me emails ;-(
Are you you using my shortcode [church_admin type="restricted"] to wrap a series of blocks? Not sure why it doesn’t work, guessing that the WP creators didn’t envisage mixing shortcodes and blocks like that!For the next update 3.6.48 [church_admin type="restricted" loginform=0] will just show “Restricted content”, instead of the login form. Then you can wrap each block of content with the shortcode without the repeating form
I’ve not got round to creating a block for it, though it would be possible to create a block that allows nesting I think.
5th January 2023 at 11:26 am #6833ahiltonnParticipantThanks Andy,
Yes, I was trying to use the shortcode to wrap a series of blocks. Not sure if it’s a WP thing, or an issue with the block plugin.
The new shortcode should be a huge improvement, I will look forward to the update!
Alan
-
AuthorPosts
- You must be logged in to reply to this topic.