Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #203806

    Hi,

    When using the latest (and an old one) version of WishList Member, if I create a page in WP and set the content protection to on, the page is protected.

    However…. If I turn on the Avia Layout Builder on and save the page, the page protection is lost.

    Any ideas on how to solve this?

    Matt

    PS. I have tried turning on & off custom post types, that made the problem worse by none of the pages appearing in the protection list, just a collection of image files

    • This topic was modified 10 years, 11 months ago by moggiex.
    #203812

    Hi Matt!

    Try applying the solution Peter provided here: https://kriesi.at/support/topic/password-protect-pages-with-dynamic-templates/#post-113640

    Regards,
    Josue

    #203815

    Hi Josue,

    Just had a look and that’s very close (and in my files), but this is for password protected pages.

    I’m guessing there is a check prior to this that the builder is missing which WLM uses and that’s the reason why the pages withthe builder being used on are being allowed to pass.

    Matt

    #203821

    Definitely, when the ALB is active the file that renders it is template-builder.php not page.php. Maybe you could stick using the normal Page without ALB using the Magic Wand shortcode generator instead.

    Best regards,
    Josue

    #203823

    Hi Josue,

    Considered that but when you switch between the two modes, Enfold drops the page contents :/

    Matt

    #203845

    Ah ha, so it’s a known problem:

    From Wishlist member:

    Hi there Matt,

    Thanks for your message.

    We had a couple of tickets came in a week ago about the same issue.

    We investigated the issue and found that when using the “Advance Layout Editor” to insert the content, the filters page_template or single_template are not being initialized. These filters which is standard to WordPress is being used by WishList Member to protect content.

    We already sent them (theme developers) an email regarding the issue to see if we can do a workaround to the issue. We’re still waiting for their response.

    I’ll let you know as soon as we hear back from them.

    Thanks and take care,

    Matt

    #203852

    Hey!

    We’re not familiar with the Wishlist member code and your best bet is to contact the plugin author. I recommend to use the “avf_template_builder_content” hook in template-builder.php to manipulate the content if the page is protected by Wishlist. Basically you can use the filter like

    
    add_filter('avf_template_builder_content', 'avia_wishlist_content_check', 10, 1);
    function avia_wishlist_content_check($content){
    	$id = get_the_ID();
    	$user_can_access_page = my_wishlist_check($id);
    	if(!$user_can_access_page)
    	{
    		$content = get_wishlist_login_form();
    	}
    
    return $content;
    }
    

    and replace my_wishlist_check() pseudo code with the wishlist function which checks if the user can view the page or not and the get_wishlist_login_form() pseudo code/function with the function which outputs the login form code. Note that the “avf_template_builder_content” filter requires enfold 2.4.4+ – older theme versions just use the the_content filter but it affects all posts/pages and thus I decided that we’ll add a second filter for template builder pages.

    Regards,
    Peter

    #203864

    Hi Peter,

    Fab Idea, just tried that but replies on me actually knowing what the WL member check function is :/

    I can’t play piggy in the middle on this one, have a site to launch on the 1st Jan and the editor was the main reason why i chose enfold (along with the theme looking fab!) Will have to go back through ~110 pages and see what I can do to disable the editor and not loose the content in the pages.

    Very much appreciate the help.

    Matt

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘WishList Member & Avia Layout Builder for Pages’ is closed to new replies.