Simple Membership Plugin › Forums › Simple Membership Plugin › Simple Membership doesn't work with all my page templates
- This topic has 2 replies, 2 voices, and was last updated 11 years, 4 months ago by
Leon.
-
AuthorPosts
-
July 17, 2015 at 9:43 am #2347
Leon
ParticipantI 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, LeonJuly 18, 2015 at 1:57 am #2354admin
KeymasterIs 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 #2355Leon
ParticipantThanks 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;
-
AuthorPosts
- You must be logged in to reply to this topic.