Show Sticky Posts on Top of the Archive Templates – WPX Tetris Theme

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

Enqueue child theme

function hello_elementor_child_enqueue_scripts() { wp_enqueue_style(‘constantine’, get_stylesheet_directory_uri() . ‘/style.css’,[‘hello-elementor’],’1.0.0′); } add_action( ‘wp_enqueue_scripts’, ‘hello_elementor_child_enqueue_scripts’ );Continue reading