Skip to content

Instantly share code, notes, and snippets.

View frikishaan's full-sized avatar
💻
Coding...

Ishaan frikishaan

💻
Coding...
View GitHub Profile
@frikishaan
frikishaan / functions.php
Last active September 15, 2024 07:18
Exclude current post from query loop
<?php
/*
* In this example, we are excluding the current post from a list in Generate Press query loop
*/
add_filter( 'generateblocks_query_loop_args', function( $query_args, $attributes ) {
// apply filter if loop has class: recent-posts-grid
if (! is_admin() && ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'recent-posts-grid' ) !== false) {
@frikishaan
frikishaan / style.css
Created May 21, 2025 06:18
Make whole card clickable
/* Reference video - https://youtu.be/VHh8FWYWhLM?t=1280 */
.card {
position: relative;
}
.card a::after {
content: "";
position: absolute;
inset: 0;