Duplicated tag in loop

Seems like one of your ACF fields contain a <a> tag in them. In HTML you cannot have and <a> tag inside another <a> tag. Check the ACF fields the_field(‘feature_item_title’) and the_field(‘hero_subtitle’), check their content, most likely you will find a <a> tag in one of them, remove it and your html will be structured … Read more

wp_get_attachment_url not fetching URL?

then check like that: $thumb_id = get_woocommerce_term_meta( $subcategory->term_id, ‘thumbnail_id’, true ); $term_img = wp_get_attachment_url( $thumb_id ); and check like this $meta = get_term_meta( $subcategory->term_id ); var_dump($meta); $thumb_id = $meta[‘thumbnail_id’][0]; $term_img = wp_get_attachment_url( $thumb_id ); and you also get like this $thumbnail_id = get_term_meta( $subcategory->term_id, ‘thumbnail_id’, true ); $image = wp_get_attachment_url( $thumbnail_id );

$post is undefined in wordpress loop [ajax]

Is it okay to call global $post; inside the loop in ajax or is there a better way to access the current post object? I’d do it outside the loop but in the same scope to avoid duplication, but otherwise the answer is: If it works, then it works, don’t stress about it, there is … Read more

Trying to get all links in my posts

After further investigation, I noticed my theme was actually replacing all the anchor tags with shortcodes for SEO purposes, so there weren’t any links in the content anymore. I was able to make it work by replacing $content = get_the_content(); with $content = apply_filters( ‘the_content’, get_the_content() );