Sticky Posts on Category Pages

add_action(‘pre_get_posts’, function($query) { if (!is_admin() && $query->is_main_query() && is_category()) { $sticky_posts = get_option(‘sticky_posts’); if (!empty($sticky_posts)) { add_filter(‘posts_orderby’, function($orderby, $query) use ($sticky_posts) { if (!is_admin() && $query->is_main_query() && is_category()) { global $wpdb; $sticky_list = implode(‘,’, array_map(‘intval’, $sticky_posts)); return “FIELD({$wpdb->posts}.ID, {$sticky_list}) DESC,…Continue reading

Increase Dropdown Menu Width – Divi Themes

.et_pb_menu ul.sub-menu { width: 300px; /* Adjust this value to your desired width */ } /* Optional: Adjust width of individual list items and links within the dropdown */ .et_pb_menu ul.sub-menu li { width: 100%; /* Ensures list items take…Continue reading

Normalize

// Add custom styles function add_custom_style_normalize() { wp_register_style( ‘the-new-normal’, ‘https://github.com/sarahschopick/the-new-normal.css/blob/1f917841c3a1382d644952dcaefb67e947467e22/the-new-normal.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal’ ); } add_action( ‘wp_enqueue_scripts’, ‘add_custom_style_normalize’ );Continue reading