Skip Navigation

[Resolved] Access doesn't hide whole page but only the main content

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#1943347

Hi there

We have just created a membearea within the website of our client. We are now in the testing phase and just realised, that the titel and comments of the cpt-post are still visible for guests. We created the memberarea with toolset and used the “Toolset Access” Plugin to restrict access. Usually this means, that the whole cpt-post is restricted, but here it only hides the “main content”.

Example: hidden link --> You see the "please log in" message that replaces the content. But the post meta (title and comments) shouldn't be visible as well.

Could you help out?

#1944139

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

Toolset only acts on the results of the WordPress function the_content, I am sure that the title and the comments are displayed by the theme.
You may need to hook into the theme's functions to remove those or create your own template for the custom post type, by copying the theme's template and making sure that the title and comments are only displayed for allowed users. Does it make sense?
Check this article https://toolset.com/documentation/customizing-sites-using-php/creating-templates-single-custom-posts/

You may want to use a child theme, this way, updates to the parent theme will not overwrite your modifications. Read more about child themes and WordPress template hierarchy in the following articles:
- https://developer.wordpress.org/themes/advanced-topics/child-themes/
- https://developer.wordpress.org/themes/basics/template-hierarchy/

I hope this helps. Let me know if you have any questions.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.