After running and developing so many WordPress websites, we have built few shortcodes functions that you can use on your website or blog.
We have posted here 4 shortcode codes that are easy to use and customizable. We have separated every shortcode functions. Just follow the below instruction.
Let’s not waste time and go to the point.
4 Essential Shortcodes for WP Websites.
Below we have listed the all of the shortcodes that you would need on your WordPress website.
1: Add Twitter & Facebook Share button
The code which is just below of this paragraph is for adding facebook & twitter share button on your website. This code is great if you don’t want to use any plugins.
Code Snippets to Add Facebook and Twitter shortcode share button
How to Use the above FB and Twitter code.
Just copy the whole code into your WordPress theme’s functions.php file then use this “[sharethis]” shortcode to call the button in your post or page.
2. Easy Remote site snapshot using WordPress API shortcode
If you wanna take any website’s snapshot by using WordPress shortcode then you need to use the following code in your theme.
This will help you to easily take remote site snapshot and then display it on anywhere in your posts or pages.
Code to remote site snapshot.
How to use remote site snapshot shortcode.
Copy the below code and paste it into your WordPress theme’s functions.php file. Then customize the width or height size as per your requirement.
3. Easy to use & embed iFrame Shortcode
Lot’s of time when we have to embed the video for our post or for our client’s song lyrics post from youtube, we use iframe embed tag. But typing all of this big line of code can take time.
That’s why we have created the below iframe embed shortcode function that will help us to easily embed video from any website.
Code to embed iFrame Shortcode
How to use above code.
You just need to copy the below code and paste it into your theme’s functions.php file.
After that give the link, write the width and height.
4. Easy to include remote file/doc with Shortcode
This is the interesting shortcode function that with you can easily include any website data or file in your post or pages.
Code to include remote file with Shortcode
How to use the above code
The example is given in the above code snippets. You just need to replace the page URL. eg: [getfile fileurl=”http://exmaple.com/page.html”]
If you guys have any questions or wanna say something about this post, please let us know in the comment box.