why does an empty get_the_excerpt change get_the_ID to default homepage?
why does an empty get_the_excerpt change get_the_ID to default homepage?
why does an empty get_the_excerpt change get_the_ID to default homepage?
The following should suffice. It will redirect to your custom URL only if the order has not failed. add_action( ‘woocommerce_thankyou’, ‘ii_redirect_thankyou’); function ii_redirect_thankyou( $order_id ){ $customer_orders = get_posts( array( ‘numberposts’ => 2, // getting 2 as by the time this purchase has happened the count will be 1. ‘meta_key’ => ‘_customer_user’, ‘meta_value’ => get_current_user_id(), ‘post_type’ … Read more
New posts are not showing up on my front page
How can I change a translation for a string in a plugin?
From what I see is the issue within your code. Your issue is that you try to fetch the post type in your nested if-statements from the current post, even though at the first if statement, you validate against it and break the function. What you want to do instead is to validate the post … Read more
Want to build parent-child relationships between custom post types created with CPT UI
Thumbnail image doesn’t show up in Shortcode output
sorry. I’m very sorry, I could already solve. I have my local wordpress installation in a site.test/wordpress/ subfolder and in the ajax I make the request without the subfolder. I still have the doubt about the numbers that are added at the end of the url. :/
<?php /* * Template Name: Gallery Page */ $query_images_args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => – 1, ); $query_images = new WP_Query( $query_images_args ); ?> <?php get_header();?> <div class=”main”> <div class=”row”> <?php foreach ( $query_images->posts as $image ) {?> <div class=”col-md-3″> <?php echo wp_get_attachment_image( $image->ID,’thumbnail’ );?> </div> <?php … Read more
How to display the category name in the tab and post inside the tab in WordPress?