As a SEO purpose it is a good idea. I am making the category archive page with Elementor theme builder. I shall display the category description below the category title. Here I am sharing my procedure. Adding The Short Description We shall add the short description to every category from Dashboard. Login to Dashboard Navigate… Continue Reading
archive
How to remove "Archives for" text from date archive title?
Original request was: At the moment it says ‘Archive for june 2016’ but I want it to be just June 2016. Two ways you can do this. I am showing both methods at below: Method 1 ‘Archive for ‘ is using by the internationalization function (__() ). By “gettext” filter we can remove this translated… Continue Reading
Showing full content on category page
Drop the following code in your functions.php file
1 2 3 4 5 6 7 8 |
add_action( 'genesis_entry_content', 'show_full_content', 1 ); function show_full_content() { if( ! is_category() ) //* returning early if it is not a category page return; add_filter( 'genesis_pre_get_option_content_archive', '__return_false' ); //* disabling the excerpt add_filter( 'genesis_pre_get_option_content_archive_limit', '__return_false' ); //* disabling the content limit option } |
if you are targeting the specific category page then use the following snippet:
1 2 3 4 5 6 7 8 |
add_action( 'genesis_entry_content', 'show_full_content', 1 ); function show_full_content() { if( ! is_category( 153 ) ) //* 153 is the category ID. return; add_filter( 'genesis_pre_get_option_content_archive', '__return_false' ); add_filter( 'genesis_pre_get_option_content_archive_limit', '__return_false' ); } |
153 is my “Plugins” category ID. So code is only executing when a user is visiting my “Plugins” category archive page. Checkout this link for more details about WordPress’s is_category() function.
Making Category Archive Page in Gallery Format
Step 1: Add this following code in your functions.php file : Step 2: Create a new js file “hover.js” and put in “your-child-theme-folder/js” folder. Now add this scripts into this file:
1 2 3 4 5 6 7 |
jQuery(document).ready(function($){ $(".col-3").hover(function(){ $(this).find('.entry-header').fadeIn(); },function(){ $(this).find('.entry-header').fadeOut(); }); }); |
Step 3: Loading this new JS file on your site using wp_enqueue_scripts function. Add the following php code in your functions.php file. This… Continue Reading