Compatibility with Patreon Plugins

Posted in: Newspaper
Post count: 6

Hi,

We are using the TagDiv Newspaper Theme alongside CodeBard’s ‘Patron Plugin Pro’ and ‘Patron Content Manager’ plugins. The various Patreon plugins lock specific posts to non-patreons, encouraging them to subscribe in order to view the content.

When attempting to lock entire posts, the various Patreon plugins see the outer template as the post – locking the template, rather than the post itself – presumably because the outer templates are also posts with their own post IDs. This breaks the layout, and prevents us from using most of the Patreon features. It also means that elements such as the ‘Become a Patron’ buttons are shown twice – once for the template, and again for the post itself. In these cases, we have to hide the erroneous elements via CSS.

Interestingly, we have a custom widget plugin which displays related posts from the same category in a sidebar. On any template using this widget, the post locking works perfectly. I’ve narrowed it down to the ‘have_posts()’ and ‘wp_reset_postdata()’ functions the widget uses to display the related posts. When either of these functions are used, post locking works perfectly. That’s as far as I can go with diagnosing the issue – and adding the widget to every template to fix the problem is simply not an option.

Can you advise how we might fix the issue globally? Or are you able to include something in your next update to achieve this? I understand the issue may be with the Patreon plugins as opposed to the theme, so I have also submitted this to CodeBard support.

Thanks in advance!

Post count: 35449

Hi MGatehouse, I think that this situation appears only when you are using a single post from tagDiv Cloud Library and not with a standard post style. If is so, then this can be because the cloud templates are some post types and the Patreon plugin is interpreted like a post types not like a template.
Now I can not guaranteed that I can help to fix this, but if I have some example and here to make some investigations, maybe I can provide some help.
Thank you!

Post count: 6

[…]

Post count: 6

Hi Calin,

Yes, we are using single post templates via the Cloud Library – not standard post styles.

So, here is a post using a single post template: https://lab.org.uk/haiti-needs-solidarity-not-charity/

If you look at the source, you’ll see there is an additional ‘Like this post?’ element outside the ‘tdc-zone’ div element, which we have hidden with the following CSS:

div[class$="patreon_button"] {
display: none;
}

This happens on all posts, regardless of whether we are using our custom related posts widget: https://lab.org.uk/glencore-and-anglo-american-blamed-for-pollution/

Then, here is a draft of the first post – locked via the Patreon plugin: https://lab.org.uk/?p=20871&preview=true&public=true

You’ll see that the outer template is locked – as opposed to the post itself. The post content is never loaded, and the ‘Unlock with Patreon’ element sits on the left – outside the post container element.

Finally, here is a draft of the second post – locked via the Patreon plugin. This post uses a template which has our custom related posts widget in the sidebar: https://lab.org.uk/?p=20872&preview=true&public=true

You’ll see that the post locking works perfectly. The outer template is displayed with featured image, title, categories and sidebar. The the ‘Unlock with Patreon’ element is in the correct position, and there are no duplicated elements.

The custom widget uses a WordPress post query loop. If this loop is removed, the post locking no longer works. When either the have_posts() or wp_reset_postdata() functions are called, post locking works as intended.

Hope that helps – please let me know if you have any questions.

Thanks!

Post count: 35449

Hi,

If I’m right you are referring to this one https://i.imgur.com/eZVr5tu.png this is exactly how I was thinking, the Patreon Plugin it is understand the cloud template in two ways, as template (because it is setting the unlock button inside the content), but it is also it is understand it as man content and it is also add the button the second time at the end of single post template. If you make a test with a standard template then this will be display only once inside the post content. Now this problem it’s not that bad, it can be easily fixed (like you did) with a CSS.
Now the main question it is here https://lab.org.uk/?p=20871&preview=true&public=true all posts it should look like this https://lab.org.uk/?p=20872&preview=true&public=true
I do not know exactly why this is empty like there is no single post template there. Maybe this is a behavior of the Patreon plugin, but I do not know exactly since we didn’t test the plugin. If you set there a default post style from standard pack it is acting the same?
Thank you!

Post count: 6

Hi Calin,

We’ve not used the default post styles before, so I’ve just run a couple of tests. I can confirm that content locking seems to work fine using the ‘Default’ template: https://lab.org.uk/?p=20927&preview=true&public=true

However, the ‘Like this post?’ elements are never displayed on any default post styles.

Thanks!

Post count: 35449

Hi,
If you are referring to this option https://i.imgur.com/FipKSwB.png this will be display only on some browsers because it is deprecate (the developers from fakebook are no longer updating the like button api), also another condition that this button to be display, it is that the user to be already logged on Facebook on that browser.
Thank you!

Post count: 6

Hi Calin,

No – sorry – I was referring to the ‘Like this post?’ button the Patreon plugin adds to posts. These are never shown when using the theme’s default templates.

Do you think there is any way we can get plugins to reliably recognise TagDiv posts as actual posts in all circumstances, and not the outer templates? Patreon is fast becoming an essential part of our website, and the unorthodox way in which the Newspaper theme templates work is really becoming an issue.

Thanks!

Post count: 35449

Hi MGatehouse, I’m sorry, but since we didn’t tested this plugin I do not know exactly how it should work and how it should look. But I can see the ‘Like this post?’ button the Patreon plugin adds (only the message differs) from default and cloud templates -> https://i.imgur.com/QyNf7vp.png -> https://i.imgur.com/I1qHKUZ.png
AS for the compatibility, we want to make the theme better and our developers are searching to find a way to prevent the content to repeat on cloud templates, but about the compatibility, I think that it will be need to be integrated, since the theme is not tested with this plugin.
Thank you for your understanding!

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.