• Resolved sonofzell

    (@sonofzell)


    Greetings,

    I’m hoping you can offer me some guidance with the use of this plugin. While the instructions provided are certainly clear, I’m a little embarrassed to admit that I simply can not get it to work. I am attempting to hide content from users that are not logged in using the [hide for=”!logged”] shortcode.

    The content I am trying to hide is actually a shortcode itself, however for testing purposes I’ve simply added [hide for=”!logged”]Lorem ipsum dolor sit amet.[/hide] per your example. The “Lorem ipsum” text is visible regardless of the user’s logged in status. I’ve dumped all site and browser caches, but just can’t seem to figure out where I’m going wrong.

    An example of the test code is at https://www.warminsterpioneers.org/wordpress/profile/?sonofzell/about. Any advice is certainly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Andrés Villarreal

    (@andrezrv)

    Hi there,

    That should work, but you need to make sure you’re using straight quotes (") instead of curly quotes () in the for attribute. The documentation might seem misleading right now, since the plugin repository is converting the straight quotes in the usage examples to curly quotes. It needs to be written like this:

    
    [hide for="!logged"]Lorem ipsum[/hide]
    

    Please let me know if this works.

    Best,

    Andrés.

    Hi Andrés,

    Had the same issue, and this is the answer:

    That should work, but you need to make sure you’re using straight quotes (“) instead of curly quotes (”) in the for attribute.

    I don’t know how many times I have copy & pasted code examples and forgotten to check the quotes after copying into “editors”. When will I learn ??

    Thank you for a great plugin that totally hits the spot, and makes it easy.

    • This reply was modified 7 years, 11 months ago by simontech.

    I solved this with one straight quote: [hide for=’!logged’]

    Ahhhhh boló… avisáaa jajajajaja

    Hahaha Andrés, please update the docs; I don’t know how much time I spent trying to figure out what was going on… Thanks anyway!

    Andres,

    The problem comes from copy/pasting right off your wordpress samples.

    You should have a warning with them that they can’t be copy/pasted directly from the page.

    Omg thank you, I was legit about to uninstall and give this plugin a 1 star as it doesn’t work at all. As soon as I changed the quotes to single ‘ like the other person mentioned then it worked. I was copying/pasting from the WordPress plugin page directly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘What am I missing?’ is closed to new replies.