large image size of 1440×1440 not pulling 2x of 2880×2880 image

Three things to check: Have you added add_theme_support(‘post-thumbnails’);? Is the uploaded image larger than 2880px x 2880px? Are you already regenerate all the thumbnails, including the existing?. Referring to the second, if the image is not “suitable” for the size, WordPress won’t make the thumbnail, because it can’t. For instance, if you upload an image, … Read more

wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow

I dont understand where are you calling from. I can give you an alternative solution that may or may not work in your case (since I don’t fully understand your case): This is your ajax-url on your site: echo admin_url( ‘admin-ajax.php’ ); Usually we attach it to the JS to run AJAX calls: wp_localize_script( ‘THE_JS_THAT … Read more

Last updated posts shortcode in functions.php

You can do this like bellow // register shortcode add_shortcode(‘last-modified’, ‘last_mofied_shortcode_callback’); function last_mofied_shortcode_callback() { $output=”<ol class=”list-numbered”>”; $recently_updated_posts = new WP_Query( array( ‘post_type’ => ‘post’, ‘posts_per_page’ => ’13’, ‘orderby’ => ‘modified’, ‘no_found_rows’ => ‘true’ // speed up query when we don’t need pagination ) ); if ( $recently_updated_posts->have_posts() ) : while( $recently_updated_posts->have_posts() ) : $recently_updated_posts->the_post(); $output … Read more

Function to function shortcode help [closed]

Not sure what you would need this for but this is how you take the data of the variable $result from the operation function to your shortcode: operation(); function operation(){ $result=5+1; return $result; } function my_function(){ $result = operation(); return (string)$result; } add_shortcode( ‘my-shortcode’, ‘my_function’ );