Category: WordPress
With 208 articles also related to:
Aleš Sýkora wrote:
Child posts menu for custom post type parent item
November 28, 2023 in WordPress
This code will help you display menu of childs on current post. For example: Product 1 = parent has those child pages: – Product usage- How to- Disclaimer- Calculator When you put this child items menu in your template, it will show all childs of product 1 on all child pages and also on product…
Aleš Sýkora wrote:
Get WordPress title for page, post, category, archive in Oxygen
November 28, 2023 in Oxygen Builder, Plugins, WordPress
Want to create only one template for Header and Footer – the main template – in Oxygen sometimes? So You need to display the title of current page, post, archive, category in one place. It cannot be done with Oxygen conditionals :(. So you have to make it done with code block and custom PHP.…
Aleš Sýkora wrote:
Change required fields by current time in Iconic Delivery Slots
January 21, 2021 in WordPress
If you need to set the fields required in some times, you need to use custom function for that. Why is it needed? For example ASAP delivery is not possible to cutoff in the morning. You can set cutoff time in the evening. but next day, it is avaible immediately after midnight. So I created…
Aleš Sýkora wrote:
Translate labels in Iconic Delivery Slots
January 21, 2021 in WordPress
If you need to change labels of fields added by Iconic Delivery Slots to WooCommerce checkout, use this snippet:
Aleš Sýkora wrote:
Change WP Rocket lazyload treshold
January 21, 2021 in WordPress
Default treshold for lazyload is 300px in WP-Rocket. That means that images that are within 300px of the viewport (browser window) are loaded for smooth user experience. If you like to load less images – for example 100px after viewport only – you can not set it up directly in WP Rocket’s settings page. To…
Aleš Sýkora wrote:
Translate WordPress string with code
January 21, 2021 in WordPress
Sometimes you want to change just one word in translation and you dont want to create .po and .mo files, install translation plugins etc. So use the function str_replace and replace the string you want. For example I am changin “Add to cart” to “Přidat do košíku”. You can place this code to your code…
Aleš Sýkora wrote:
Better product gallery lightbox with Oxygen and Fancybox
November 28, 2023 in Oxygen Builder, Plugins, WordPress
I will show you, how I am creating galleries like this (open random car to see it) in Oxygen Builder. I hate the product builder and default behavior of WooCommerce lightbox and magnifying glass function on hover. So I am using Image block wrapped in link – for featured image. And Oxygen’s gallery block for…
Aleš Sýkora wrote:
Custom WordPress login logo
November 28, 2023 in Advanced Scripts, Custom Code, Plugins, WordPress
Would you like to have your brand logo instead of default WordPress logo at your login page? Use this snippet in your custom funcionality plugin or in code snippets etc. I am using the Advanced Scripts plugin. This snippet changes the default logo and add link to the homepage. It also add custom Title for…
Aleš Sýkora wrote:
Oxygen Dynamic repeater examples
January 14, 2021 in Oxygen Builder, Plugins, WordPress
Query parent pagedata in Oxygen repeater Query parent page on child page. If current page is parent then query this page itself. Display all posts with same ACF post object field value Gets current post ID and look for posts connected to it by post object field from ACF.
Aleš Sýkora wrote:
Conditional check if page is parent or child in WordPress
January 14, 2021 in WordPress
If you need to display something only if post has childs (or not), you can use this conditional in your code.