- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
How to Create a Shortcode in WordPress
Learn step-by-step how to create a WordPress shortcode. Start your WordPress website with Hostinger web hosting 👉 https://bit.ly/3uazx8b
💥 Use the discount code WP10 to get 10% OFF!
This WordPress shortcode tutorial demonstrates all the steps to create a shortcode in your WordPress website. All the necessary code snippets are available in the description below – note that the process requires some coding knowledge.
____________________________________________
___________________________________________
📌 Handy links
How to Create a Shortcode in WordPress (In 7 Steps): https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
____________________________________________
⭐ Follow Us ⭐
TikTok: https://www.tiktok.com/@hostingeracademy
Twitter: https://twitter.com/Hostinger
Facebook: https://www.facebook.com/Hostinger/
WordPress Explained Group: https://www.facebook.com/groups/wpexplained
Hostinger Tutorials: https://www.hostinger.com/tutorials
Subscribe to our channel: https://www.youtube.com/c/HostingerAcademy?sub_confirmation=1
____________________________________________
🕒 Timestamps
00:00 - Intro
00:11 - What is WordPress shortcode
01:21 - Creating a shortcode function
03:06 - Adding shortcode functionality
04:12 - Creating an enclosing shortcode
04:35 - Outro
___________________________________________
A WordPress shortcode is a small piece of PHP code that allows you to quickly add elements to your website’s page and post.
There are six default WordPress shortcodes:
👉 Audio
👉 Playlist
👉 Gallery
👉 Video
👉 Embed
👉 Caption
However, you can also create new shortcodes to help you publish articles faster and more efficiently. So, let’s see how to create a custom WordPress shortcode.
1️⃣ Create a New Theme File
👉 Access a File Manager or FTP client and create a custom-shortcodes.php file inside your theme’s directory. Add the necessary block of code.
👉 Save changes and delete the local file option. Then, add the code at the bottom of the functions.php file.
2️⃣ Create the Shortcode Function
👉 Open the custom-shortcode.php file and insert the desired action. In this video, we’re adding social media links to a post.
Right after that, add a callback function so WordPress knows the action is a shortcode:
3️⃣ Test the Custom Shortcode
👉 Create a new post on your WordPress website and insert the custom shortcode:
[subscribe]
4️⃣ Add Parameters to the WordPress Shortcode
👉 Open the custom-shortcodes.php file and add a code snippet so that you can customize the links within the shortcode tag.
5️⃣ Test the Parameters
👉 Let’s test the parameters by adding the shortcodes to your WordPress post.
6️⃣ Create an Enclosing WordPress Shortcode
👉 Open your custom-shortcode.php file and add the necessary lines of code
7️⃣ Add the Enclosing Shortcode to the Website
👉 For the Facebook anchor text:
[subscribe link='https://www.facebook.com/Hostinger/']Facebook[/subscribe]
👉 For the Twitter anchor text:
[subscribe link='https://twitter.com/Hostinger?s=20/']Twitter[/subscribe]
Watch our WordPress shortcode tutorial to see the shortcode’s final result. If you would like to check out the exact code snippets we used, visit the tutorial How to Create a Shortcode in WordPress: https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
________________________________________
▶ Want to see more awesome tutorials like this one in the future? Consider subscribing 😁
https://www.youtube.com/c/HostingerAcademy?sub_confirmation=1
▶ If you have questions, don’t hesitate and join our Facebook group for more help:
https://www.facebook.com/groups/wpexplained
____________________________________________
Thank you for watching! Let us know in the comments below if you have any questions. Good luck on your online journey. 🚀
#WordPressShortcode #WordPressShortcodeTutorial #HostingerAcademy
Видео How to Create a Shortcode in WordPress канала Hostinger Academy
💥 Use the discount code WP10 to get 10% OFF!
This WordPress shortcode tutorial demonstrates all the steps to create a shortcode in your WordPress website. All the necessary code snippets are available in the description below – note that the process requires some coding knowledge.
____________________________________________
___________________________________________
📌 Handy links
How to Create a Shortcode in WordPress (In 7 Steps): https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
____________________________________________
⭐ Follow Us ⭐
TikTok: https://www.tiktok.com/@hostingeracademy
Twitter: https://twitter.com/Hostinger
Facebook: https://www.facebook.com/Hostinger/
WordPress Explained Group: https://www.facebook.com/groups/wpexplained
Hostinger Tutorials: https://www.hostinger.com/tutorials
Subscribe to our channel: https://www.youtube.com/c/HostingerAcademy?sub_confirmation=1
____________________________________________
🕒 Timestamps
00:00 - Intro
00:11 - What is WordPress shortcode
01:21 - Creating a shortcode function
03:06 - Adding shortcode functionality
04:12 - Creating an enclosing shortcode
04:35 - Outro
___________________________________________
A WordPress shortcode is a small piece of PHP code that allows you to quickly add elements to your website’s page and post.
There are six default WordPress shortcodes:
👉 Audio
👉 Playlist
👉 Gallery
👉 Video
👉 Embed
👉 Caption
However, you can also create new shortcodes to help you publish articles faster and more efficiently. So, let’s see how to create a custom WordPress shortcode.
1️⃣ Create a New Theme File
👉 Access a File Manager or FTP client and create a custom-shortcodes.php file inside your theme’s directory. Add the necessary block of code.
👉 Save changes and delete the local file option. Then, add the code at the bottom of the functions.php file.
2️⃣ Create the Shortcode Function
👉 Open the custom-shortcode.php file and insert the desired action. In this video, we’re adding social media links to a post.
Right after that, add a callback function so WordPress knows the action is a shortcode:
3️⃣ Test the Custom Shortcode
👉 Create a new post on your WordPress website and insert the custom shortcode:
[subscribe]
4️⃣ Add Parameters to the WordPress Shortcode
👉 Open the custom-shortcodes.php file and add a code snippet so that you can customize the links within the shortcode tag.
5️⃣ Test the Parameters
👉 Let’s test the parameters by adding the shortcodes to your WordPress post.
6️⃣ Create an Enclosing WordPress Shortcode
👉 Open your custom-shortcode.php file and add the necessary lines of code
7️⃣ Add the Enclosing Shortcode to the Website
👉 For the Facebook anchor text:
[subscribe link='https://www.facebook.com/Hostinger/']Facebook[/subscribe]
👉 For the Twitter anchor text:
[subscribe link='https://twitter.com/Hostinger?s=20/']Twitter[/subscribe]
Watch our WordPress shortcode tutorial to see the shortcode’s final result. If you would like to check out the exact code snippets we used, visit the tutorial How to Create a Shortcode in WordPress: https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
________________________________________
▶ Want to see more awesome tutorials like this one in the future? Consider subscribing 😁
https://www.youtube.com/c/HostingerAcademy?sub_confirmation=1
▶ If you have questions, don’t hesitate and join our Facebook group for more help:
https://www.facebook.com/groups/wpexplained
____________________________________________
Thank you for watching! Let us know in the comments below if you have any questions. Good luck on your online journey. 🚀
#WordPressShortcode #WordPressShortcodeTutorial #HostingerAcademy
Видео How to Create a Shortcode in WordPress канала Hostinger Academy
wordpress shortcode wordpress shortcode tutorial wordpress tutorial wordpress shortcodes how to wordpress shortcode plugin wordpress shortcodes tutorial wordpress custom shortcode wp tutorial wordpress website wordpress shortcodes api examples of wordpress shortcodes wordpress development wordpress shortcode example wp shortcode wordpress shortcode with parameters wordpress shortcode development wordpress shortcode button wordpress tutorial 2022
Комментарии отсутствуют
Информация о видео
5 апреля 2022 г. 20:15:59
00:05:04
Другие видео канала





















