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 if ( ! function_exists( ‘add_custom_style_normalize’ ) ) { function add_custom_style_normalize() { // The New Normal CSS wp_register_style( ‘the-new-normal-css’, ‘https://cdn.jsdelivr.net/gh/sarahschopick/the-new-normal.css@main/the-new-normal.min.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘the-new-normal-css’ ); // Alternative normalization stylesheets (only use one) // Normalize: https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css //…Continue reading