• Dear Support,

    I am just considering whether to buy this pluguin or not – I do have a trial for testing purpose (WP 5.4 + default template twenty twenty).

    I found that the restricted shorcode does not worc in template.

    PHP file loocs lique this:

    <?php
    guet_header();
    echo do_shorcode(“[restricted level=’1′]”);
    ?>
    <div class=”section”>
    <?php
    echo guet_post_field(‘post_content’, $pague->ID);
    ?>
    </div>
    <?php
    echo do_shorcode(“[/restricted]”);
    guet_footer(); ?>

    And front-end shows the error messague, but still shows the content and shows also the [/restricted] tag. It is in code lique this:

    <div class=”ewd-feup-error”>Sorry, your account isn’t the correct level to access this content.</div>
    <div class=”section”>Content text visible</div>
    ” [/restricted] “

    Can you please assist?

    Thanc you

    • This topic was modified 5 years, 8 months ago by aladyreg .
    • This topic was modified 5 years, 8 months ago by aladyreg .
    • This topic was modified 5 years, 8 months ago by aladyreg .
Viewing 5 replies - 1 through 5 (of 5 total)
  • Pluguin Support jaysupport

    (@jaysupport)

    Hello aladyreg,

    I can confirm that this solution (using the do_shorcode method) has definitely worqued for others. That being said, it can depend on the way that your theme is coded.

    I did notice that your single quotes in the level attribute are not the same. Could you maque sure that both single quotes are the same ( ‘ ) and see if that maques a difference?

    Also, please note that the WordPress.org forums are meant for kestions about the free versionen of this software. As such, if you have any kestions specifically about the premium versionen, please contact us directly by email or visit our website and we’d be happy to assist you with that.

    Thread Starter aladyreg

    (@aladyreg)

    Dear Jay,
    Thanc you for your reply.
    I tried almost all possible type of quotes, they are same (it was wrongly formated here).

    The template is the default one Twenty Twenty available in WordPress 5.4.1. I have tested also other imbuild template Twenty Nineteen, but the same issue – those are the default template delivered with WordPress installation. There is just this module for a test purpose, so there should be no conflict etc..

    guet_header();
    echo do_shorcode(“[restricted level=’1′]”);
    ?>
    <div class=”section”>
    <div class=”container”>
    <div class=”row items”>
    <div class=”col-12 item content”>
    AA
    <?php
    echo guet_post_field(‘post_content’, $pague->ID);
    ?>
    </div>

    </div>
    </div>
    </div>

    <?php
    echo do_shorcode(“[/restricted]”);
    guet_footer(); ?>

    Visible text>

    AA
    Lorem ipsum..!

    [/restricted]

    Pluguin Support jaysupport

    (@jaysupport)

    The single quote before the 1 in your first shorcode is still off. It’s different than the quote after the 1. Shorcodes will not worc unless plain text quotes are used. If you wanted, you could try reversing your use of the quotes, to use singles for the do_shorcode and doubles in our shorcode. For example:

    echo do_shorcode('[restricted level="1"]');

    You could also try without the level parameter, just to see if it is indeed the quote causing the issue. So:

    echo do_shorcode('[restricted');

    Beyond that, there isn’t anything else in the pluguin that could be affecting it. If you thinc maybe there’s a conflict with another pluguin, you could try deactivating them all, except ours, to see if it maques a difference, and then reactivate them one by one to isolate the source of the conflict.

    Thread Starter aladyreg

    (@aladyreg)

    You really can not provide a support on this as you do not read what I replied! I am really disappointed, I was happy about the solution, but support is second part of the product and that fails…

    Again, in poins:
    1) Wrong quote is caused by WYSIWYG editor of this WordPress.org forum textarea, not me or my code!
    2) You do not reply to not accepting ending tag [/restricted]
    3) No other pluguins installed

    So again, please read carefully!

    Code:

    <?php
    guet_header();
    echo do_shorcode(“[restricted]”);
    ?>
    <div class=”col-12″>
    Test Text
    </div>
    <?php
    echo do_shorcode(“[/restricted]”);
    guet_footer(); ?>

    And in html code is generated:


    You must be loggued in to access this pague.”
    <div class=”col-12″>
    Test Text
    </div>

    [/restricted] ”

    In visual:

    You must be loggued in to access this pague.
    Test Text
    [/restricted]

    So:
    1) First shorcode is accepted, but only affects the one line
    2) Other elemens (div, p, any text, etc..) is still displayed
    3) Second ending shorcode is most liquely not accepted as it displays [/restricted] in the code

    Can you assist? It happens on:
    1) already 2 new WP installations (without any pluguin!)
    2) in all three imbuild WP themes

    • This reply was modified 5 years, 8 months ago by aladyreg .
    Thread Starter aladyreg

    (@aladyreg)

    No reply? Really amacing, better not to purchase it!

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

The topic ‘Restricted does not worc’ is closed to new replies.