Тёмный

Add Preloader In Wordpress Without Plugins [06] 

WPCookie
Подписаться 895
Просмотров 4,3 тыс.
50% 1

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@GreeseGilbertVijayJ
@GreeseGilbertVijayJ Год назад
Thanks Bro
@adamcardi6340
@adamcardi6340 Месяц назад
Hello sir, first of all thanks for this guide. Just wondering if the preloader can be shown only once, let's say once per day. Is there a guide for it? Thanks
@WPCookie
@WPCookie Месяц назад
Hey there, you're very welcome! To show the preloader only once per day, you can create a custom cookie that expires after a day and then check if it exists before showing the loader animation. It's not too complicated to set up, and you can ask ChatGPT for help with the code.
@theman7050
@theman7050 Год назад
The 'init' hook is such a good trick here. Wow. Thanks man.
@andreas_serm
@andreas_serm 10 месяцев назад
Thank you very much for your help. How can I make it visible for only the first time site opens???. Best regards.
@WPCookie
@WPCookie 10 месяцев назад
Hello, you can't do that.
@andreas_serm
@andreas_serm 10 месяцев назад
I found it my friend. At the beginning of your function must check cookies. function redpishi_preloader() { // Check if the cookie exists and has the value 1 if (isset($_COOKIE['redpishi_preloader']) && $_COOKIE['redpishi_preloader'] == 1) { // If yes, return early and do nothing return; }
@gustavobakit9857
@gustavobakit9857 Год назад
I am very grateful with your code, my friend. Thank you very much, it worked very well for me. Best regards.
@mirecmartinez8463
@mirecmartinez8463 Год назад
hey, i uploaded the svg, but after changing the url from library, new svg stops animating, how can i fix it?
@WPCookie
@WPCookie Год назад
Which SVG do you use? Your own or the one in the post.
@avisioncreator9517
@avisioncreator9517 2 года назад
thanks
@WPCookie
@WPCookie 2 года назад
You're welcome!
@sahilkale8311
@sahilkale8311 2 года назад
After adding the code in functions.php , preloader is working but Some widgets not showing on website & Customizer is continuously Refreshing the page, What is Solution ?
@WPCookie
@WPCookie 2 года назад
This code is written to be compatible with most themes. In your case, to investigate this problem, I need to know the name of your theme and plugins, Meanwhile if this code interferes with your site, please do not use it.
@sahilkale8311
@sahilkale8311 2 года назад
@@WPCookie Newscard - by theme horse
@sahilkale8311
@sahilkale8311 2 года назад
Please help
@anmolagarwal7542
@anmolagarwal7542 2 года назад
Amazing! Thank you! :)
@WPCookie
@WPCookie 2 года назад
Glad you like it!
@blueli6351
@blueli6351 Год назад
Wow thank you for this video this is the simplest way I can find!! By the way. I am trying to apply this on a specific page. So I tried something like this, added global $post; and modified the condition if(!is_admin() && $GLOBALS["pagenow"] !== "wp-login.php" && $post->ID == 123 ) But it does not work. Any idea what I am missing? Thanks
@WPCookie
@WPCookie Год назад
Hello. To add this preloader to one or more posts, you must use this conditional tag: is_single([123, 456]) for pages: is_page([123, 456]) Read more about conditional tags in my blog: redpishi.com/wordpress-tutorials/insert-code-in-wordpress-without-plugins/#insert-php-code-in-wordpress-for-only-specific-pages
@blueli6351
@blueli6351 Год назад
@@WPCookie Thanks!, and eventually, I also found out why it does not work. I have to change the init hook to 'template_redirect'
Далее
Add PHP Code in Wordpress Properly without plugins [07]
19:44
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24
I Took An iPhone 16 From A POSTER! 😱📱 #shorts
00:18
I used to hate QR codes. But they're actually genius
35:13
7 Wordpress Plugins I install on all websites (2024)
15:07
I tried every FREE website builder. This is the best
7:58
13 Things To Remove From Your Website Immediately
12:33
How to Add Elementor Page Preloaders & Transitions
9:14
The Easiest Way to Build Websites
10:56
Просмотров 506 тыс.
How To Put Your WordPress Site In Maintenance Mode
10:14