Skip Navigation

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

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.

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 5 months, 1 week ago.

Assigned support staff: 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.