Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

Simple Membership doesn't work with all my page templates

Simple Membership Plugin › Forums › Simple Membership Plugin › Simple Membership doesn't work with all my page templates

Tagged: protection doesn't work "page template"

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 4 months ago by Leon.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 17, 2015 at 9:43 am #2347
    Leon
    Participant

    I have a custom made wordpress site that uses different templates for each page.
    I can protect pages created with most of these templates. Two of these templates however, I cannot protect.

    The page I want protected is [http://strategicsoulventures.com/wordpress/ledenpagina/]

    I hope anyone can help. Please let me know what, if any code is necessary to answer my question.

    Thanks.
    Kind regards, Leon

    July 18, 2015 at 1:57 am #2354
    admin
    Keymaster

    Is this template executing the standard WordPress’s “the_content” filter? If it isn’t then the plugin won’t be able to hook in there and protect the content.

    July 18, 2015 at 10:33 am #2355
    Leon
    Participant

    Thanks for answering so fast!

    This is the beginning of the template’s code. It says:

    <?php
    $content = get_the_content();

    But maybe the plugin stumbles onto another issue?

    Kind regards,
    Leon

    <?php
    /*
    * Template Name: Leden Template
    */

    get_header(); ?>
    <div id=”contentleftleden”>
    <div id=”content”>
    <?php
    $count = 0;
    $postId = $post->ID;
    //query_posts(array(‘showposts’ => 6, ‘category_name’ => ‘Ledenpagina’));
    query_posts(array(‘showposts’ => 6, ‘category__in’ => array(11,17), ‘orderby’ => ‘date’, ‘order’ => ‘desc’));

    if (have_posts()) :
    while (have_posts()) : the_post();
    $newsPostId = $post->ID;
    ?>
    ” class=”title-anchor”>
    <?php
    echo $count == 0 ? ‘<h1>’ : ‘<h3>’;
    $customtitel = get_post_meta($post->ID, ‘Custom titel’, true);
    if(strlen(trim($customtitel)) > 0):
    echo $customtitel;
    else:
    the_title();
    endif;
    echo $count == 0 ? ‘</h1>’ : ‘</h3>’;
    ?>

    <?php

    $content = get_the_content();

    if($count == 0):

    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);

    //$content = strlen(trim($content)) > 1400 ? substr($content, 0, 1400) . ‘…’ : $content;

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy