Trying send mail from Theme page

If you assign wp_mail() to a variable you can echo the results. Should return either true or false. $email = wp_mail(email,subject,message); var_dump($email); I don’t recognise the send_message() function in your code.

How to manipulate wordpress template tags’ output

For lots of WordPress template tags, including the_categories() you can’t change the HTML output. Instead, you can use something like get_the_categories() and loop through the results to create your own HTML. <ul id=”whatever” data-attribute=”you” class=”want”> <?php $categories = get_the_category(); if ( ! empty( $categories ) ) : foreach( $categories as $category ) : ?> <li><a … Read more

Using ‘get_template_directory_uri’ correctly

get_template_directory_uri(), as the name suggests, gets the URI of the theme. You want the filesystem path, which is get_template_directory(): <?php require get_template_directory() . ‘/woocommerce/single-product/test.php’ ?> Better yet, use the WordPress template loading system: <?php locate_template( ‘woocommerce/single-product/test.php’, true /* Locate AND load the file */ ) ?>