Bootstrap Carousel HTML structure and funny output [closed]

You have a nested anchor tag. I have never seen that done before. You are wrote this with your code <a href=”#”><a href=”#”></a></div></div></a> I would think that is your problem. Why do you need this first anchor tag? ?php while ($postsSlider->have_posts()) : $postsSlider->the_post(); if ($first) { ?> <a class=”foto_link” href=”https://wordpress.stackexchange.com/questions/290742/<?php the_permalink(); ?>”>//should this be here … Read more

WordPress check if current taxonomy has child

There is solved: $taxonomy_name=”listing_category”; $queried_object = get_queried_object(); $term_id = $queried_object->term_id; $termchildren = get_terms( $taxonomy_name, array( ‘parent’ => $term_id, ‘hide_empty’ => false ) ); echo ‘<ul>’; foreach ( $termchildren as $child ) { echo ‘<li><a href=”‘ . get_term_link( $child, $taxonomy_name ) . ‘”>’ . $child->name . ‘</a></li>’; } echo ‘</ul>’;

Get uploaded image and attach it to the new post

You have to use the javascript FormData object to upload files via ajax. A simple tutorial is provided here. In PHP the file will be available via the globals $_FILES and $_POST. Additional to the tutorial the WordPress specific data “action” (and maybe “nonce”) have to be added to the formData object: formData.append(‘action’, ‘add_your_action_here’); // … Read more

How to get image from url from the database?

I’d highly recommend to escape all values before output, e.g. echo esc_html( $retrieved_data->NAME ). The same for the image: <img src=”https://wordpress.stackexchange.com/questions/292680/<?php echo esc_url( $retrieved_data->icon ); ?>” /> You can read more about Securing Output in the developer handbook.

Filter by field with array value in ACF on WP REST API

Advanced Custom Fields stores values for multiple select fields as a serialised Array. For a select field with options ‘one’ and ‘three’ selected, the value stored on the database would look like this: ‘a:2:{i:0;s:3:”one”;i:1;s:5:”three”;}’ It is simply not possible with WP_Query (which is where your meta query ends up) or SQL to filter results based … Read more

Pass return-path additional parameter in wp_mail

Yes! There’s a plugin that does this, and it’s very simple. It uses the phpmailer_init to adjust the $phpmailer object. This is the code it uses: if ( ! function_exists( ‘wp_mail_returnpath_phpmailer_init’ ) ) { function wp_mail_returnpath_phpmailer_init( $phpmailer ) { // Set the Sender (return-path) if it is not already set if ( filter_var( $params->Sender, FILTER_VALIDATE_EMAIL … Read more