Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author thomstark

    (@thomstark)

    <?php echo do_shortcode('[eyesonly]stuff[/eyesonly]'); ?>

    Thread Starter kingsparadise

    (@kingsparadise)

    thanks for the quick response,
    i have try using the php code above is not working` this is what i did
    NOTE: my aim is to show the master sliders to only logout users or guests but hide when i user login.

    <?php echo do_shortcode(‘[eyesonly hide=”yes” logged=”in”]
    <?php masterslider ( 2 ); ?>
    [/eyesonly]’) ; ?>

    <!— master slider function starts here —->

    <?php if( function_exists( ‘masterslider’ )): ?>

    <?php masterslider ( 2 ); ?>
    <?php else: ?>

    <div class=”main_graphic”>
    <div class=”main_graphic_inner”> …

    then i try this, it hide the master sliders to both logged and logout users

    <?php if( function_exists( ‘do_shortcode’ )): ?>

    <?php echo do_shortcode(‘[eyesonly hide=”yes” logged=”out”]
    <?php masterslider ( 2 ); ?>
    [/eyesonly]’) ; ?>
    <?php else: ?>

    <!— master slider function starts here —->

    <?php if( function_exists( ‘masterslider’ )): ?>

    <?php masterslider ( 2 ); ?>
    <?php else: ?>

    <div class=”main_graphic”>
    <div class=”main_graphic_inner”>

    please help me out

    Plugin Author thomstark

    (@thomstark)

    You’re calling <?php inside a <?php tag which will give you an error. The following is correct:

    <?php echo do_shortcode('[eyesonly hide="yes" logged="in"]'.masterslider(2).'[/eyesonly]'); ?>

    Thread Starter kingsparadise

    (@kingsparadise)

    I don’t know what I’m doing wrong i use the code above and the slider shows for both logged in and logged out users,in fact i removed all the slider function and the <div class tag and use only this yet it kept showing for both users
    <?php echo do_shortcode('[eyesonly hide="yes" logged="in"]'.masterslider(2).'[/eyesonly]'); ?>

    Plugin Author thomstark

    (@thomstark)

    Turn off administrator override in your eyes only settings. It’s probably working just fine for everyone but you.

    Thread Starter kingsparadise

    (@kingsparadise)

    yes i did that, i even created a new user account as a subscriber to test it yet is is showing for both users. this is the screen shot of the admin setting https://ezexcomm.net/wp-content/uploads/2014/10/snapshot-1170×516.png”&gt;

    Thread Starter kingsparadise

    (@kingsparadise)

    maybe i can give you access to the admin end of the site, the site is still under development

    Plugin Author thomstark

    (@thomstark)

    All working. After some troubleshooting, I discovered that calling the masterslider() function itself would always display the slider, but if you use the [masterslider] shortcode, Eyes Only is able to do its job.

    First I tested this: [eyesonly logged="out"]Test[/eyesonly] and that worked fine. Eventually I figured out that Master Slider was the issue. This is the working final result in your header.php:

    <?php echo do_shortcode('[eyesonly logged="out"][masterslider id="1"][/eyesonly]'); ?>

    Thread Starter kingsparadise

    (@kingsparadise)

    You made my day. Thanks so much .You are the best

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Php code’ is closed to new replies.