Category Post Grid

post_grid_layout_element_author_link_permalink

add_filter(‘post_grid_layout_element_author_link_permalink’, ‘post_grid_layout_element_author_link_permalink_20200614’, 10, 2); function post_grid_layout_element_author_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_author_permalink

add_filter(‘post_grid_layout_element_author_permalink’, ‘post_grid_layout_element_author_permalink_20200614’, 10, 2); function post_grid_layout_element_author_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_post_date_permalink

add_filter(‘post_grid_layout_element_post_date_permalink’, ‘post_grid_layout_element_post_date_permalink_20200614’, 10, 2); function post_grid_layout_element_post_date_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_thumb_link_permalink

add_filter(‘post_grid_layout_element_thumb_link_permalink’, ‘post_grid_layout_element_thumb_link_permalink_20200614’, 10, 2); function post_grid_layout_element_thumb_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_thumb_permalink

add_filter(‘post_grid_layout_element_thumb_permalink’, ‘post_grid_layout_element_thumb_permalink_20200614’, 10, 2); function post_grid_layout_element_thumb_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_excerpt_read_more_permalink

add_filter(‘post_grid_layout_element_excerpt_read_more_permalink’, ‘post_grid_layout_element_excerpt_read_more_permalink_20200614’, 10, 2); function post_grid_layout_element_excerpt_read_more_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_excerpt_permalink

add_filter(‘post_grid_layout_element_excerpt_permalink’, ‘post_grid_layout_element_excerpt_permalink_20200614’, 10, 2); function post_grid_layout_element_excerpt_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_title_link_permalink

add_filter(‘post_grid_layout_element_title_link_permalink’, ‘post_grid_layout_element_title_link_permalink_20200614’, 10, 2); function post_grid_layout_element_title_link_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

post_grid_layout_element_title_permalink

add_filter(‘post_grid_layout_element_title_permalink’, ‘post_grid_layout_element_title_permalink_20200614’, 10, 2); function post_grid_layout_element_title_permalink_20200614($post_link, $args){ $post_id = isset($args[‘post_id’]) ? $args[‘post_id’] : ”; $download_url = get_field( “download_url”, $post_id ); $post_link = !empty($download_url) ? $download_url : $post_link; return $post_link; }  

Post order by view count

Track view count by adding following code under theme functions.php file function post_grid_single_post_view_count(){ // replace by your post types if ( is_singular( ‘post’ )){ $post_id = get_the_ID(); $post_view_count = (int) get_post_meta(get_the_ID(),’post_view_count’, true); update_post_meta(get_the_ID(), ‘post_view_count’, ($post_view_count+1)); /* * * for unique…

Enable debug and debug log

To enable debug and debug log to your WordPress site please copy and paste following 2 lines to your WordPress root directory under  config.php file define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_LOG’, true ); And then save or update  config.php file, then try…

Thumbnail size issue

Welcome to our forum. If your site contains any square size image you can use that size under media settings for post grid layout editor View post on imgur.com If you don’t see any square size image, then you can…