Reply To: A Few Questions

NapitWPTech Theme Support Forums The NewsMag A Few Questions Reply To: A Few Questions

#208

Bishal Napit
Keymaster

@jthoke

Here are the solutions on your queries:
1. For the feature which you require for your site will require lots of code customization work, which I could not cover all via this forum. Hope you can understand. But, if you can code it on your own, then, you can achieve it via the child theme easily. You can find the tutorial on child theme as well as the sample child theme here: https://napitwptech.com/tutorial/wordpress-development/tutorial-creating-wordpress-child-theme/. Also, for this, since I have made that via the widgets, you can find tutorial on widget via this link: https://codex.wordpress.org/Widgets_API.

Now, from this theme, in the file inc/widgets.php copy the code from line number 357 to 471 in the functions.php file of the child theme and change the required class as mentioned in above widget API link and process further. This way, new widget will be created in which, you need to find the code:

if ($type == 'latest') {
	$category_posts_grid = new WP_Query(array(
		'posts_per_page' => $number,
		'post_type' => 'post',
		'ignore_sticky_posts' => true,
		'no_found_rows' => true
	));
} else {
	$category_posts_grid = new WP_Query(array(
		'posts_per_page' => $number,
		'post_type' => 'post',
		'ignore_sticky_posts' => true,
		'category__in' => $category,
		'no_found_rows' => true
	));
}

and replace with the below PHP code and check:

if ($type == 'latest') {
	$category_posts_grid = new WP_Query(array(
		'posts_per_page' => $number,
		'post_type' => 'post',
		'ignore_sticky_posts' => true,
		'no_found_rows' => true,
		'offset' => 1
	));
} else {
	$category_posts_grid = new WP_Query(array(
		'posts_per_page' => $number,
		'post_type' => 'post',
		'ignore_sticky_posts' => true,
		'category__in' => $category,
		'no_found_rows' => true,
		'offset' => 1
	));
}

2. Can you try the below provided CSS code in the Additional CSS Box provided via the Customizer Options and check:-

.category #primary .featured-image img, .category #primary .category-links, .category #primary .entry-meta-comments, .category #primary .entry-header-meta, .category #primary .entry-content {
	display: none !important;
}
.category #primary .format-standard.has-post-thumbnail .entry-title {
	position: relative;
	bottom: 0;
}

Thanks.
Bishal Napit