• Skip to main content
  • Skip to primary sidebar

WordPress, Genesis Framework and Storefront customization tutorials

  • Archive
    • Free
    • Premium
  • Blog
  • About
  • Contact
  • Newsletter
  • Login
Home » Free » Page 8

Free

How do I list Custom Post Type’s Taxonomies

Filed Under: Free Tagged With: Taxonomy

How to display different menu for logged-in users

Put this snippet in the functions.php

Filed Under: Free Tagged With: Menu

Universal Parallax in Genesis

Demo

Universal Parallax GIT

Step 1

Download the javascript files, or install via npm

Step 2

Enqueue the JS files in your child theme’s functions.php

Step 3

Create the HTML structure in a the file names parallax.php
Your Child Theme/templates/home/parallax.php

Step 4

Add some line of SCSS

Step 5

Create the shortcode for the above created parallax.php file

Step 6

Put the shortcode [parallax] wherever You want to be shown the parallax background.

Filed Under: Free Tagged With: Genesis, Parallax

Change menu toggle breakpoint in Storefront

I created a child theme with Storefront for a hungarian chocolate manufacture called Sweetic.

When I was shrinking the browser window the standard navigation menu didn’t work the proper way:

I addad this snippet to SCSS to fix it:

Filed Under: Free Tagged With: Storefront

Extend the free WooCommerce Wholesale Prices to show tax excluded price

While I was working on one of my projects I was wondering if is it possible to extend the features of the free WooCommerce Wholesale Prices plugin?

Regarding to my client’s request I need to display prices in the shop as tax excluded. So If You don’t want to pay for the premium add-on, that includes a bunch of other features that You don’t even need, here’s my snippet that solves this problem.

Remove the regular price if You are logged in as a wholesaler user role.

Filed Under: Free Tagged With: Wholesale

Remove tax included price for wholesalers in WooCommerce

Filed Under: Free Tagged With: Storefront, WooCommerce

Change breadcrumbs home text and link in Storefront

Change breadrumbs only on single product page

Read more in official WooCommerce documentation

Filed Under: Free Tagged With: Breadcrumb, Storefront

How to use Genesis Custom Blocks

WP Engine released the Genesis Custom Blocks plugin, that’s going to be replace the famous Advanced Custom Fields plugin. Best for all, that it works not only with Genesis Themes, but will also you can use with any WordPress theme that supports Gutenberg Block Editor.

1) Install and activate Genesis Custom Blocks plugin

2) Create some custom fields

genesis-custom-blocks settings

3) Create a folder in your theme named blocks and a template file with block-{slug}.php

genesis-custom-blocks template file

Just copy and paste the following snippet in your template file

4) Let’s go ahead and add your just created block with Gutenberg wherever You want

add genesis-custom-block with gutenberg

5) Now You can edit each content field from the block editor

6) The content is going to be shown in the front end

7) After I added some styling to the content, it will be look like this

This is an SCSS code, so need to compile it to make it work.

genesis-custom-blocks cta

Now you have nothing to do but drag and drop the widget wherever You want to be shown up this nice looking CTA section.

Filed Under: Free Tagged With: Genesis

Change Genesis Search Widget’s Placeholder Text

To change “Search this site …” add this snippet to functions.php:

Filed Under: Free Tagged With: Genesis

Change breadcrumbs home text in Genesis

Add this to functions.php

Filed Under: Free Tagged With: Genesis

Display Google Maps location address details of ACF field without coordinates

<?php 
$location = get_field('location');
if( $location ) {

    // Loop over segments and construct HTML.
    $address = '';
    foreach( array('street_number', 'street_name', 'city', 'state', 'post_code', 'country') as $i => $k ) {
        if( isset( $location[ $k ] ) ) {
            $address .= sprintf( '<span class="segment-%s">%s</span>, ', $k, $location[ $k ] );
        }
    }

    // Trim trailing comma.
    $address = trim( $address, ', ' );

    // Display HTML.
    echo '<p>' . $address . '.</p>';
}

Filed Under: Free Tagged With: ACF, Google Maps

Display title of current post’s category

$category = get_the_category(); echo $category[0]-> cat_name; 

Filed Under: Free Tagged With: PHP

Enqueue CSS for WordPress admin

// =========================================================================
// WPADMIN CSS
// =========================================================================
function admin_css() {
	wp_enqueue_style( 'admin_css', get_stylesheet_directory_uri() . '/assets/css/wpadmin.css' );
}
add_action('admin_print_styles', 'admin_css' );

Filed Under: Free Tagged With: PHP

Query ACF Repeater Field with embedded Group

<!--REPEATER-->
<?php if( have_rows('repeater') ): ?>
    <?php while( have_rows('repeater') ): the_row(); ?>
    <!--GROUP-->
        <?php if( have_rows('group') ): ?>
           <?php while( have_rows('group') ): the_row(); 
                // vars
                $title = get_sub_field('title'); ?>

                <?php echo $title; ?>
            <?php endwhile; ?>
        <?php endif ?>
        
    <?php endwhile; ?>
<?php endif ?>

Filed Under: Free Tagged With: ACF, PHP

Sticky footer in Storefront

Filed Under: Free Tagged With: Storefront

Remove sidebar and force full width layout in Storefront

// =========================================================================
// STOREFRONT REMOVE SIDEBAR - FULL WIDTH LAYOUT
// =========================================================================
function wpflames_remove_storefront_sidebar() {
    remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
    add_filter( 'body_class', function( $classes ) {
        return array_merge( $classes, array( 'page-template-template-fullwidth page-template-template-fullwidth-php ' ) );
    } );
}
add_action( 'get_header', 'wpflames_remove_storefront_sidebar' );

Filed Under: Free Tagged With: Storefront

How to use single social icon with svg sprite without include the whole Font Awesome icon set

Create a file named sprite.svg

<svg>
	<symbol id="fb-icon" viewbox="-20 -20 200 200">
		<path fill="white" d="M91.84,71.34l3.37-21.99h-21.1V35.08c0-6.02,2.95-11.88,12.4-11.88h9.59V4.49c0,0-8.7-1.49-17.03-1.49	C61.7,3,50.35,13.53,50.35,32.59v16.76H31.04v21.99h19.31v53.15h23.77V71.34H91.84z"/></path>
	</symbol>
</svg>

Paste this in functions.php

function add_image_sprite_map(){
    include('assets/images/sprite.svg');
}
add_action('storefront_before_header', 'add_image_sprite_map');

Use the icon wherever You want

<a target="_blank" href="" rel="noopener noreferrer">
    <svg class="fb-svg"><use xlink:href="#fb-icon" /></svg>
</a>

Filed Under: Free Tagged With: SVG

Enqueue script with WordPress hook

Filed Under: Free Tagged With: PHP

Hook Data Layer with variables for Google Tag Manager in WooCommerce

Filed Under: Free Tagged With: tag manager, WooCommerce

Display the selected checkbox in ACF

<?php
$colors = get_field('colors');
if( $colors ): ?>
<ul>
    <?php foreach( $colors as $color ): ?>
        <li><?php echo $color; ?></li>
    <?php endforeach; ?>
</ul>
<?php endif; ?>

Filed Under: Free Tagged With: ACF

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Page 10
  • Interim pages omitted …
  • Page 19
  • Go to Next Page »

Primary Sidebar

Gabor Flamich

Hi! I'm Gabor.
I write tutorials on WordPress and WooCommerce.

MacBook

12 Essential Snippets for Genesis Developers

Subscribe to my Newsletter to view my basic collection of Genesis snippets that I use for my projects!

Sign Up for Free
  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube
UpdraftPlus Premium

Tags

ACF Ajax Analytics API Bootstrap Breadcrumb category CPT CSS fetch FSE Genesis Google Maps Gutenberg HTML Isotope JavaScript jQuery loop Map Menu Parallax PHP Rest API SASS SEO SQL Storefront SVG tab tag manager tags Taxonomy Tool upsell Webpack Wholesale WooCommerce WordPress WPML

Disclosure: Some of the links in this site are affiliate links. I will be paid a commission if you use this link to make a purchase.

  • Privacy Policy / Terms of Service
© 2025 WP Flames - All Right Reserved