Hi There,
We have this issue too.
Your currency placeholder is after the currency in the single-course template which is not correct in the UK.
Currently the template is like this…
//metabox
$nd_learning_meta_box_price = get_post_meta( get_the_ID(), 'nd_learning_meta_box_price', true );
if ( $nd_learning_meta_box_price == 0 ) {
$nd_learning_meta_box_price = 'Free';
} else {
$nd_learning_meta_box_price = $nd_learning_meta_box_price.' '.$nd_learning_currency;
}
It needed to be prior to this.
//metabox
$nd_learning_meta_box_price = get_post_meta( get_the_ID(), 'nd_learning_meta_box_price', true );
if ( $nd_learning_meta_box_price == 0 ) {
$nd_learning_meta_box_price = 'Free';
} else {
$nd_learning_meta_box_price = $nd_learning_currency.' '.$nd_learning_meta_box_price;
}
Rather than hacking the template in the plugin we wanted to copy it and add it in the child theme.
To do this create a directory called templates in the child theme.
Save courses-single.php in there and make your amends.
However this does not work :o(
For the developer.
To be more consistent with WP calls. You could update your plugin include change dirname(__FILE__) to plugin_dir_path( __FILE__ ) perhaps.
Example: change this in file… nd-learning.php around line 79
function nd_learning_get_courses_template($nd_learning_single_course_template) {
global $post;
if ($post->post_type == 'courses') {
$nd_learning_single_course_template = dirname( __FILE__ ) . '/templates/single-course.php';
}
return $nd_learning_single_course_template;
}
add_filter( 'single_template', 'nd_learning_get_courses_template' );
To something like this…
function nd_learning_get_courses_template($nd_learning_single_course_template) {
global $post;
if ($post->post_type == 'courses') {
$nd_learning_single_course_template = plugin_dir_path( __FILE__ ) . '/templates/single-course.php';
}
return $nd_learning_single_course_template;
}
add_filter( 'single_template', 'nd_learning_get_courses_template' );
Thanks
Andi