Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Resolved] How to get rating average from CRED for review

$
0
0

No idea why however I get a parse syntax error
Parse error: syntax error, unexpected '[' in /home/whataweb/public_html/typestest/wp-content/themes/dynamik/custom-functions.php on line 40

when i add the following to my custom-functons.php file

//Calculates and displays the number of reviews in a post
[reviews_total] shortcode:
add_shortcode('reviews_total', 'reviews_total_func');
function reviews_total_func()
{
$child_posts = types_child_posts('reviews');
return count($child_posts);
}

Viewing all articles
Browse latest Browse all 20145

Trending Articles