Looking to create an “update theme” functionality for a custom front-end dashboard

You could add a REST endpoint to check if the current theme has an update. Here’s a quick example to get you started: function wpd_register_themecheck_route(){ register_rest_route( ‘themecheck/v1’, ‘/updates/’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘wpd_check_theme’ ) ); } add_action( ‘rest_api_init’, ‘wpd_register_themecheck_route’ ); function wpd_check_theme(){ $current_theme = get_option( ‘template’ ); $theme_updates = get_option( ‘_site_transient_update_themes’ ); $return … Read more

How to Show Next, Previous, and Page Numbers with wp_link_pages

You are using the wrong function, please check this link https://codex.wordpress.org/Function_Reference/paginate_links As you can see your code should be global $wp_query; $big = 999999999; // need an unlikely integer echo paginate_links( array( ‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ), ‘format’ => ‘?paged=%#%’, ‘current’ => max( 1, get_query_var(‘paged’) ), ‘total’ => $wp_query->max_num_pages, … Read more

Is_single not working properly in genesis

Please put your action add_action( ‘genesis_after_header’, ‘gp_page_header’); in if condition not whole code. if(is_single()){ add_action( ‘genesis_after_header’, ‘gp_page_header’); } Your updated code: if(is_single()) { add_action( ‘genesis_after_header’, ‘gp_page_header’); } function gp_page_header(){ $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), ‘single-post-thumbnail’ ); ?> <div class=”post-hero” style=”background-repeat: no-repeat;background-size:cover;background-image: -webkit-radial-gradient(left top, circle cover, rgba(100, 66, 255, 0.9) 15%, rgba(0, 108, 255, 0.9) … Read more