Create a WordPress Admin User via FTP
Check if cart total greater than specific price
Remove main text editor for WooCommerce products
Allow to edit privacy policy for shop managers
Custom Admin Menu Order in WordPress
Add this snippet to functions.php
Display current user role in WordPress
Add this snippet to functions.php:
Use this shortcode [display_user_role] to display the user role wherever you want.
How to Change Genesis Widget Title from H3 to div
Classic Widgets – Disable Block Editor for Widgets
Change Toggle Menu Breakpoint in Genesis
Delete all WooCommerce Products
Run an SQL command through PhpMyAdmin
Make sure, that you made backup your database before you execute the SQL statement! Than select table “wp_posts” (if you have wp prefix) and run the SQL statement. If your database prefix is not the default wp_
, you will need to replace this with the database prefix you are using.
WordPress Loop with Taxonomy for Custom Post Type
Ajax Filter with Images and Hover effect for WordPress CPT
In this project we are going to create an Ajax filter from WordPress Custom Post Type, that displays images with fancy hover effects. You can filter posts without refreshing the page. I didn’t use either a page builder or a plugin to create this feature.
Step #1 – Create a Custom Post Type for Cities
In this example I’m going to create a Custom Post Type named City, but it could be anything You want. Please care about the taxonomy’s slug in this case “city_cat“. You need to change it to Your custom slug.
Add this snippet to functions.php
your-child-theme/functions.php
Step #2 – Create some Taxonomies for City Custom Post Type
Step #3 – Add some posts in City
You can download the XML file from the demo to import.
Step #4 – Enqueue scripts in functions.php
Step #5 – Build the filter
Create a file named filter.php
your-child-theme/ajax/filter.php
Find and replace the taxonomy and post type:
#6 'taxonomy' => 'YOUR_TAXONOMY' #28 'post_type' => 'YOUR_POST_TYPE',[Read more…] about Ajax Filter with Images and Hover effect for WordPress CPT
Isotope Gallery from WordPress Featured Images
In this project I created a WordPress gallery from Custom Post Type’s featured images using Isotope filter combined with lightGallery.
With Isotope You can filter items like portfolio, gallery images or any kind of HTML elements.
lightGallery displays images in Lightbox in a very fancy way with captions and paginations. During WordPress development, I strive to use as few plugins as possible. So I implemented these features directly in my child theme. I prefer Genesis Framework, but it can be used in any WordPress Theme.
Step #1 – Create a Custom Post Type
Create a Custom Post Type called Gallery and upload some images from Pixabay.
Step #2 – Upload Images
You can upload your own images, but if You want to use that pictures that I used, click here to download the demo file.
Every post has a featured image we’re going to sort them by category and display the title dynamically in the gallery.
Step #3 – Build the filter
To Loop through the categories and echo out as buttons create a file named templates/filter.php and paste the following code in it:
[Read more…] about Isotope Gallery from WordPress Featured ImagesDropdown Ajax Filter for WordPress Custom Post Type Taxonomy
In this tutorial I’m going to show You how to create a dropdown filter with AJAX for WordPress Categories.
Step #1 – Filter by taxonomy terms
Create a file named dropdown-filter.php
/your-child-theme/ajax-dropdown/dropdown-filter.php
Search and replace “YOUR_TAXONOMY” and “YOUR_POST_TYPE” in following the code!
#3 'taxonomy' => 'YOUR_TAXONOMY' #20 'post_type' => 'YOUR_POST_TYPE',
Step #2 – Create a shortcode and place it wherever You want
Just copy this code in the functions.php
[Read more…] about Dropdown Ajax Filter for WordPress Custom Post Type TaxonomyDropdown Ajax Filter for WordPress Categories in Genesis
In this tutorial I’m going to show You how to create a dropdown filter with AJAX for WordPress Categories.
Step #1 – Filter posts by category
Create a file named dropdown-filter.php
/your-child-theme/ajax-dropdown/dropdown-filter.php
If You want to filter by default WordPress Posts by Categories, the following lines must be look like this
#3 'taxonomy' => 'category' #20 'post_type' => 'post',
Step #2 – Create a shortcode and place it wherever You want
Just copy this code in the functions.php
[Read more…] about Dropdown Ajax Filter for WordPress Categories in GenesisIsotope Filter with Multiple Dropdown for WordPress Categories
In this tutorial we are going to build an Isotope Filter for WordPress Categories with multiple dropdown select options. The following project is actually a fictive job listing website with Bootstrap grid for responsive layout and Genesis Framework. But it works with any kind of WordPress theme.
Recommendations:
- Please don’t experiment on a live website, but if You do make sure that You have access to FTP
- I suggest to use LocalWP by Flywheel to setup easily a localhost with WordPress
Step #1 – Create the Custom Post Type named Jobs
Add this to functions.php
Create Taxonomy for Stack of the Job
Add this to functions.php
Create Taxonomy for City of the Job
Add this to functions.php
Step #2 – Add some dummy content
Let’ go ahead and upload your own content with different taxonomies, or You can import the demo that I used in the example above.
[Read more…] about Isotope Filter with Multiple Dropdown for WordPress CategoriesIsotope Filter with Single Dropdown for WordPress Categories
In this tutorial we are going to build an Isotope Filter for WordPress Categories with single dropdown select options. The following project is actually a fictive job listing website with Bootstrap grid for responsive layout and Genesis Framework. But it works with any kind of WordPress theme.
Recommendations:
- Please don’t experiment on a live website, but if You do make sure that You have access to FTP
- I suggest to use LocalWP by Flywheel to setup easily a localhost with WordPress
Step #1 – Create the Custom Post Type named Jobs
Add this to functions.php
Create Taxonomy for Stack of the Job
Add this to functions.php
Step #2 – Add some dummy content
Let’ go ahead and upload your own content with different taxonomies, or You can import the demo that I used in the example above.
[Read more…] about Isotope Filter with Single Dropdown for WordPress CategoriesIsotope Filter in Genesis with Buttons for WordPress Categories
In this tutorial we are going to build an Isotope Filter for WordPress Categories with buttons. The following project is actually a fictive job listing website with Bootstrap grid for responsive layout and Genesis Framework, but it works with any kind of WordPress theme.
Recommendations:
- Please don’t experiment on a live website, but if You do make sure that You have access to FTP
- I suggest to use LocalWP by Flywheel to setup easily a localhost with WordPress
Step #1 – Create the Custom Post Type named Jobs
Add this to functions.php
Create Taxonomy for Stack of the Job
Add this to functions.php
Create Taxonomy for City of the Job
Add this to functions.php
Step #2 – Add some dummy content
Let’ go ahead and upload your own content with different taxonomies, or You can import the demo that I used in the example above.
[Read more…] about Isotope Filter in Genesis with Buttons for WordPress CategoriesIsotope Filter with Search Field for WordPress Categories
In this tutorial we are going to build an Isotope Filter for WordPress Categories using Search Filed and live reload without refresh the browser. The following project is actually a fictive job listing website with Bootstrap grid for responsive layout and Genesis Framework, but it works with any kind of WordPress theme.
Recommendations:
- Please don’t experiment on a live website, but if You do make sure that You have access to FTP
- I suggest to use LocalWP by Flywheel to setup easily a localhost with WordPress
Step #1 – Create the Custom Post Type named Jobs
Add this to functions.php
Create Taxonomy for Stack of the Job
Add this to functions.php
Create Taxonomy for City of the Job
Add this to functions.php
Step #2 – Add some dummy content
Let’ go ahead and upload your own content with different taxonomies, or You can import the demo that I used in the example above.
[Read more…] about Isotope Filter with Search Field for WordPress Categories