Skip Navigation

[Resolved] Memberpress affecting custom view

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to bypass the MemberPress plugin restricted post rules with content template

Solution:
You should dispaly [wpv-post-body] shortcode with attribute "suppress_filters" set to "true" to bypass the custom shortcodes and hooks.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/memberpress-affecting-custom-view/page/2/#post-724337

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

This support ticket is created 6 years, 9 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 21 replies, has 3 voices.

Last updated by Robert 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#667232

Link to a page where the issue can be seen: hidden link

We are testing MemberPress, which is a plugin to add a subscription paywall to your site.

We have some custom views that have worked well for us for a while

They are a View that displays all posts that have a custom taxonomy. This is the view loop
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
<div class="three">[wpv-post-body view_template="Latest News Sidebar - single post"]
</div></wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-posts-found][wpml-string context="wpv-views"]No posts found[/wpml-string][/wpv-no-posts-found]
[wpv-layout-end]

And this is the Content Template for each Post
<li class="media">
[wpv-post-featured-image]
<div class="media-body">
<h3 class="media-heading">[wpv-post-link]</h3>
</div>

However when an article is protected by MemberPress it is instead displaying the excerpt, unauthorised message, and for the first article listed a login.

You can see an example here - I've highlighted in red where the protected articles should be, and they should display like the articles below them.
hidden link

In MemberPress' rules I thought it might be because "All Content with...(the custom taxonomy)" was selected, but we changed to "All Posts with...(the custom taxonomy)" but it makes no difference.

I understand it is tricky for you to support every third party plugins, but I wondered if you can provide any clue why this might be happening?

Any help would be much appreciated.

Note, the SFTP port is 2222

#667233

Sorry I forgot to add a url where you can see this - hidden link

#670729

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - this behavior is related to memberpress plugin and not added by view's so better you should contact the memberpress plugin support in order to have correct direction on this issue.

#689375

Hi - I asked the Memberpress support and they said the following

Our developers informed me that it must use the_content filter to output each post line item for it to work.

They further told me that they don't have a way to fix this for you as we filter on the_content also.

So is there an alternative way that I can use this view or content template so that Memberpress does not affect what Toolset has created?

Cheers, Rob

#690969

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I do not have any solution to offer you at the moment as I do not know which code of memberpress filtering on the_content. Toolset also uses the standard the_content() function to display the content.

Could you please send me copy of your site so I can pas it to our next level support and we will check if we can take this as a compatibility issue.
=> https://toolset.com/faq/provide-supporters-copy-site/

#691056

Hi - I tried to use Duplicator but it is not allowed by my host - hidden link

#691061

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

well - the issue is not from Toolset here as far as I see.

What if you deactivate the memberpress plugin - do you still see the login box? as I can see the login box coming from the memberpess.

#691184

Hi - Yes the login box comes from Memberpress so if Memberpress is disabled then it would disappear. You can see this yourself. I have provided admin access to this site and it is a staging site so you are able to switch off plugins or change settings to get this displaying as it should.

You say it is not a Toolset issue, but as you suggest, it is a compatibility issue. We need to use both Toolset and Memberpress, and there must be a way to adapt Toolset. Please could you look into the information I have provided (particularly the Content Template) and see if there is an alternative way to create these views that do not get affected by Memberpress' rules.

Also, this view and content template were created many years ago so there may be a more up-to-date way of doing them

This is the view - hidden link

This is the content template - hidden link

This is where Memberpress sets the rules (see bottom section - unauthorized access) - hidden link

If you have questions for Memberpress support I can pass them on.

Cheers, Rob

#691191

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please send me the link from where I can download the zip of memberpress pro plugin as I do not able to login to FTP using access details you shared with me.

I have set the next reply to private which means only you and I have access to it.

#691238
Screen Shot 2018-04-19 at 9.22.43 pm.png

I tried to provide a link to download Memberpress but the private reply is asking me for lots of information I have already provided. See screenshot

#691256

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I removed the FTP and wordpress access information.

I have set the next reply to private which means only you and I have access to it.

#691259
#691991

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - thanks for sharing the plugin zip. I will try to replicate things on my local test install and report your concern to next level support. I will get in touch with you as soon as I know more.

#696330

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've escalated this issue to our next level support for further debug and check what we can do here. Please hold on for further update.

#700567

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I got the news that we can not do anything here. I checked restricted posts with default WP loop and even with standard WP loop its behaving the same - adding login form for restricted post - so its plugin that adds the login form and wrap even standard WP loop.

Toolset Views is just a wrapper for the native WP_Query. Now, if you wants to show posts in a native WP Query even if hidden by plugin (which displays login form instead of displaying post), then this is a request to make for that plugin.

As I claimed before - Toolset is not involved here.