latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Trying to add conditional code to template

Home Forums Community Forum Trying to add conditional code to template

This topic contains 3 replies, has 3 voices. Last updated by  Bruce 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Feb 6th, 2013 at 11:56 am #40908

I am trying to show a popup only for level “0” members by adding php code to my post template file.

I am trying this

but it gives me errors.

Aby ideas?

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Wednesday Feb 6th, 2013 at 12:41 pm #40911
David Welch
Username: dwbiz05

What are the errors?

Dave

Posted: Wednesday Feb 6th, 2013 at 12:51 pm #40913

Parse error: syntax error, unexpected ‘<' in /home/cheerlib/public_html/wp-content/themes/canvas-labzip/content-post.php on line 66

Posted: Thursday Feb 7th, 2013 at 5:27 pm #41074
Bruce
Username: Bruce
Staff Member

Parse error: syntax error, unexpected ‘<' in /home/cheerlib/public_html/wp-content/themes/canvas-labzip/content-post.php on line 66

This sounds like you have put another PHP tag within a PHP tag. Something like this:

<?php

// code is here
//...
//...
<?php	   echo do_shortcode('&#91;&#91;s2If current_user_is(s2member_level0)&#93;'); ?>
<?php	   echo do_shortcode('&#91;ninja-popup ID=2484 autoopen=true&#93;'); ?>
<?php	   echo do_shortcode('&#91;/s2If&#93;&#93;'); ?>

If that’s the case, you should instead do this:

http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.
[/note_box]

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.