Latest news from Great-tit

I firmly believe that sharing knowledge is the key to mutual growth and development. Each article and guide I write is the result of countless hours of intense research and the unwavering passion I pour into it. Your support enables me to continue creating high-quality, informative, and engaging WordPress resources that empower you on your journey.

Published articles related to:

Aleš Sýkora wrote:

How to use multiple Swiper.js sliders with same settings on one page

November 28, 2023 in Custom Code, WordPress / 1 comments

If you need to use one slider with same settings on one page multiple times, you don’t need to create a JavaScript for each slider. For example, I use multiple video sliders. Their content takes from the ACF repeater: You can use one code to initiate all sliders. You don’t need to add special classes…

Continue reading

Aleš Sýkora wrote:

Change youtube to youtube-nocookie with ACF embed field

November 28, 2023 in ACF, Custom Code, Plugins, WordPress / 0 comments

With Cookie and GDPR laws, you should display the YouTube and other embeds only after user consent to marketing cookies. There is a way to avoid this but still send user IP address to YouTube and store one cookie instead of multiple ones. The way is a change of YouTube Embed URL to “youtube-nocookie.com” .…

Continue reading

Aleš Sýkora wrote:

Use first ACF Gallery image as Featured image of Custom post type single

January 9, 2024 in ACF, Custom Code, Plugins, WordPress / 3 comments

How do I set the first gallery image from a custom post type gallery field as the featured image? Found this here: Use first image from gallery of custom post type to set featured image – ACF Support (advancedcustomfields.com) It use ACF | acf/save_post (advancedcustomfields.com) filter to apply. Regenerate all posts to set the featured…

Continue reading

Aleš Sýkora wrote:

Change Gutenberg Color Pallete to your own

November 28, 2023 in Custom Code, Gutenberg, Plugins, WordPress / 0 comments

If you want to have your theme colors in Gutenberg instead of all colors use this code. You can also disable gradients in Gutenberg editor. Add this code to your functions.php or custom plugin or code snippets plugin like Advanced scripts. Add more colors if you want :-) just change the name (Zelená,Modrá…). You also…

Continue reading

Aleš Sýkora wrote:

Disable Gutenberg gradient picker

September 22, 2022 in Custom Code, Gutenberg, Plugins, WordPress / 0 comments

If you want to disable gradient picker in Gutenberg editor in Wordpress, add this code to your functions.php or custom plugin or code snippets plugin like Advanced scripts. You may also need to change default Gutenberg colors.

Continue reading

Aleš Sýkora wrote:

Disable Gutenberg Blocks and Pattern library

November 28, 2023 in Custom Code, Gutenberg, Oxygen Builder, Plugins, WordPress / 0 comments

When I use Oxygen Builder to create website for customer, I want them to edit the content in Gutenberg editor, but I don’t want to give them a “FULL POWER” of Gutenberg editor. What I do every time? Disable bunch of unused blocks and completely disable the patterns library. I also disable block styles and…

Continue reading

Aleš Sýkora wrote:

WooCommerce Add to cart message position in Oxygen Builder

November 28, 2023 in Custom Code, Plugins, WooCommerce, WordPress / 0 comments

Need to change the position of WooCommerce Notice bar on single product template in Oxygen Builder? I mean this WooCommerce notice after add to cart: It’s simple. You just need to add the text block with PHP dynamic data value or code block. As PHP function, use this code: I would suggest using the code…

Continue reading

Aleš Sýkora wrote:

Global $product cause Oxygen does not refresh CSS

September 20, 2022 in Custom Code, Oxygen Builder, Plugins, WordPress / 0 comments

The issue is related to the custom PHP functions being used the Repeaters in WooCommerce templates. Within the custom functions, after you call global $product, you need to wrap the rest of the function in an if($product) { …do stuff here } statement. This will prevent the AJAX errors. Also do not use Global $product…

Continue reading

Aleš Sýkora wrote:

Add Accessibility to the Oxygen Tabs

November 28, 2023 in Custom Code, Oxygen Builder, Plugins, WordPress / 0 comments

This snippet is currently under development. I found it working only in MS Edge browser. If you want to use Tabs element and make your site accessible with keyboard, then you should be worried about this element. By default, you cannot make this element accessible by keyboard. But no worries, I gotchu! This code made…

Continue reading

Aleš Sýkora wrote:

Display only parent categories in WordPress

September 14, 2022 in Custom Code, WordPress / 0 comments

If you want to list all Post Categories in WordPress without displaying the child categories, then you must use parent = 0 in the query. Here is the example which display the category links wrapped by the DIV.

Continue reading