I use sprintf when I return bunch of variables, it's easier than concatenating. I'm not saying that I'm bad at concatenating strings with variables, but it often leads to typos which therefore lead to errors, plus, I think the code actually becomes much cleaner when I use sprintf.
Good tip. With PHP I've spent almost no time looking outside of what I need to accomplish in the moment, so each time I dig into it, I find alternative ways to do things which are more efficient or easier to maintain.
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
Ray DelVecchio well any valid string is true by its nature.... Apart from an empty string which is falsey, so you just have to be careful when setting things as strings and not a true Boolean .. consider "false" is it Boolean false? No it's actually Boolean true... So if using strings for true and false you have to tread carefully ...
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
Is there anyone out there who offers information on how to edit a form or a page done with a shortcode? I put in the search bar "How to edit something already done in a shortcode format" All I get is how to create or use a shortcode. It's extremely frustrating. I use the elementor platform. Thank you in advance.
That's a bit more difficult, because you need to find the code that controls the shortcode. It's likely embedded within your plugin in a PHP file. Normally the shortcode creator provides options for customizing through attributes or hooks/filters that can be added to the functions file like in this tutorial. You have to look into the documentation if it's an Elementor shortcode and see how/if they let you customize the way you want.
We often hate what we don't understand, haha. Like everything with WordPress, you're limited by the developer of the theme/plugins you choose. They select the options to customize. So you need to either find a different solution or DIY. There is no platform that is "infinitely customizable" with a few clicks.
I use sprintf when I return bunch of variables, it's easier than concatenating. I'm not saying that I'm bad at concatenating strings with variables, but it often leads to typos which therefore lead to errors, plus, I think the code actually becomes much cleaner when I use sprintf.
Good tip. With PHP I've spent almost no time looking outside of what I need to accomplish in the moment, so each time I dig into it, I find alternative ways to do things which are more efficient or easier to maintain.
Ray, this is a great tutorial! Thank you so much!
Glad it was helpful!
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
Amazing thanks for this
When using a tenory function you don't need to check if it's true , as your already basically saying if it's truthy do this, else do this... @9:00
Thanks for the tip. I think I wasn't sure if the "true" would get interpreted as a string or boolean value.
Ray DelVecchio well any valid string is true by its nature.... Apart from an empty string which is falsey, so you just have to be careful when setting things as strings and not a true Boolean .. consider "false" is it Boolean false? No it's actually Boolean true... So if using strings for true and false you have to tread carefully ...
How can I use this code for blogger... Plz help me...
thanks for this
If I am not a developer and this is my first experience with short code , How should I initiate with learning it.
Awesome^^
Glad you liked it!
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
FYI @14:40 they're called pseudo-classes
Thanks - I'm good at remembering the syntax, and terrible at remembering the correct terminology!
@@RayDelVecchio Hello bro, nice content, BTW i know im out of nowhere, but can you point me to a plugin or how to make a shortcode of [hide] your text here [/hide] tried this on wordpress it doesn't seem to work, only [spoiler] is working. Well I want to force users to leave a comment on my posts then refresh page to see the posts. Any ideas how to implement that hide tags in Wordpress.
Is there anyone out there who offers information on how to edit a form or a page done with a shortcode? I put in the search bar "How to edit something already done in a shortcode format" All I get is how to create or use a shortcode. It's extremely frustrating. I use the elementor platform. Thank you in advance.
That's a bit more difficult, because you need to find the code that controls the shortcode. It's likely embedded within your plugin in a PHP file. Normally the shortcode creator provides options for customizing through attributes or hooks/filters that can be added to the functions file like in this tutorial. You have to look into the documentation if it's an Elementor shortcode and see how/if they let you customize the way you want.
@@RayDelVecchio Thank you so much for that info. I now officially hate shortcodes.
We often hate what we don't understand, haha. Like everything with WordPress, you're limited by the developer of the theme/plugins you choose. They select the options to customize. So you need to either find a different solution or DIY. There is no platform that is "infinitely customizable" with a few clicks.
You could just assign $atts[reply] so it would evaluate to true...