Category: WordPress

With articles also related to:

Aleš Sýkora wrote:

ACF repeater slider with Splide.js and Oxygen Builder

November 28, 2023 in Custom Code, Oxygen Builder, Plugins, WordPress

If you want to create custom slider, you may take some 3rd party js library. I will use the Splide.js in this tutorial, but you can also use flickity or other. I will also use Oxygen WordPress builder, but this can be done with every theme. Create ACF repeater field Install ACF and create Field…

Continue reading

Aleš Sýkora wrote:

Oxygen Pro Menu Vertical divider between items

November 28, 2023 in Custom Code, Oxygen Builder, Plugins, WordPress

If you want to add a vertical dividers between menu items, it’s simple. Just add the border-right to each (but not last) item in the menu. You can use and modify this code to add the vertical lines: Change the .pro-menu-class to your class: And customize the border-right values – width, type of border and…

Continue reading

Aleš Sýkora wrote:

WordPress 5.9 missing customizer

April 7, 2022 in WordPress

Do you want to set up a favicon for your website on WordPress 5.9+ and Oxygen Builder? No worries! Customizer is still here, but not in the admin menus anymore. Customizer doesn’t appear because new twentytwentytwo theme uses gutenberg full site editing beta. You have two options to open customizer: Install and activate older theme…

Continue reading

Aleš Sýkora wrote:

Get all child terms of parent taxonomy term in WordPress

April 7, 2022 in Custom Code, WordPress

I have my taxonomy with multiple levels. Here is an example: ProductsJackpotsSlotsTablesCompanyleadershipnewsalerts Sometimes, you want to display only child terms of parent taxonomy. In this case, I need to display all child terms of products term. What do I need to prepare? I need taxonomy ID from WordPress admin, and prepare a query. Here is…

Continue reading

Aleš Sýkora wrote:

Disable WordPress Autor archives

November 28, 2023 in Custom Code, WordPress

Don’t need to use Author archives in WordPress? Don’t forget that those pages are being generated automatically. So you need to set up redirect if you don’t need them. You can use following codes in functions.php or in custom mu-plugin, or my preffered way is using Advanced scripts. Redirect Author archives to homepage If you…

Continue reading

Aleš Sýkora wrote:

Load Gutenberg Styles only if page has blocks

November 28, 2023 in Custom Code, Oxygen Builder, Plugins, WordPress

Trying to speed up your site? You may want to disable Gutenberg block style libraries on pages and posts which doesn’t have any blocks. Add this code to your custom snippets and test it. It should disable loading of Gutenberg styles when not needed. It works with Oxygen Builder and Advanced scripts – I have…

Continue reading

Aleš Sýkora wrote:

Get ACF taxonomy field for current post in Query

April 5, 2022 in ACF, Oxygen Builder, Plugins, WordPress

For a situation where you need to display ACF taxonomy field for current terms assigned to the post in the WP Query, you may need the code below. Why to use ACF taxonomy field? It’s easy. I am using this for SEO purposes. How? I am creating website for language school. My taxonomy is called…

Continue reading

Aleš Sýkora wrote:

Display only parent posts with repeater dynamic query in Oxygen builder

November 28, 2023 in Oxygen Builder, Plugins, WordPress

If you need to display only parent pages or posts, you just need to put post_parent = 0 parameter to your dynamic query in Oxygen builder. So it will work like normal WordPress query:

Continue reading

Aleš Sýkora wrote:

Get first term of current post in WordPress query

March 24, 2022 in Custom Code, Oxygen Builder, Plugins, WordPress

If you want to display only one first term assigned to your post, add this code. It will add a link to the category with CSS class with category slug, so you can style it separately from other categories. This snippet will get all terms assigned to the post with get_the_terms function. You can also…

Continue reading

Aleš Sýkora wrote:

Query all posts from category with category__in instead of tax_query in Oxygen Advanced Query builder

November 28, 2023 in Custom Code, Oxygen Builder, Plugins, WordPress

If you want query some posts from one category, you don’t need to build the tax_query. You can use simpler solution, the category__in parameter. For example, you need to show 3 latest posts from media-mentions category. So go to the administration and find your taxonomy id. Mine is 13 so I will use it like…

Continue reading