Creating a dynamic URL for an external link inside content

This sounds like a perfect use case for Google Tagmanger Event tracking and google analytics Goals. I would refer you to https://support.google.com/analytics/answer/6164470?hl=en You can make events happen conditionally via URL or actual interaction with page elements via class or ID. Analytics goals will allow you easily track the outcomes in GA.

Query Posts to display all posts with category “custom field value”

If you are creating artists as categories then their single page template will be category.php , in category.php add the following code :- $category_id = get_cat_id( single_cat_title(“”,false) ); $cat_name = get_cat_name($category_id); $new=query_posts(‘post_type=news_album&cat=”.$category_id.”&post_status=publish&orderby=ID&order=DESC&posts_per_page=-1’); if( have_posts()) : while(have_posts()) : the_post(); echo get_the_title($post->ID); echo get_the_content($post->ID); endwhile; else: echo “No posts added for this category!”; endif; wp_reset_query();

Send default WooCommerce email when switching from custom order status

Looks like I was overcomplicating things. This is the solution: add_filter( ‘woocommerce_email_classes’, ‘custom_woocommerce_email_classes’, 10, 1 ); function custom_woocommerce_email_classes( $email_classes ) { $email_classes[ ‘WC_Email_Customer_On_Review_Request’ ] = include_once ‘includes/classes/class-wc-email-customer-on-review-request.php’; // Register custom trigger to send on-hold email when status is switched from on-review to on-hold. add_action( ‘woocommerce_order_status_on-review_to_on-hold_notification’, [ $email_classes[ ‘WC_Email_Customer_On_Hold_Order’ ], ‘trigger’ ], 10, 2 ); return … Read more

Change the template of my Blog entries

For most WordPress based sides, you can look at the classes on the body tag to find out what kind of content is being shown, a single post, a post archive, the front page etc. In your case, it’s post-template-default single single-post postid-2897 single-format-standard wpb-js-composer js-comp-ver-5.0.1 vc_responsive, so this is a single post that is … Read more

How to submit form data in the same page in WordPress without reloading the page?

Your jQuery event is bound to elements with the class submit, but your submit button in the form doesn’t have that class. Either add that class to the submit button, or just target the form itself. Simply change $(“.button”).click(function() { to $(“#modalForm”).submit(function() { This will fire when the form is submitted, whether the user clicks … Read more