Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('site-reviews/review/wrap/content', function ($html, $value, $tag) {
- // Change 462 to your Review Theme Post ID
- if (462 !== $tag->args->theme) {
- return $html;
- }
- // The Post ID of the first assigned post (because reviews can be assigned to multiple posts)
- $postId = $tag->review->assigned_posts[0] ?? 0;
- // Use the Post ID to get your meta data values
- // Here is an example of how to modify the HTML of the content tag:
- $imageUrl = 'https://i.pinimg.com/736x/58/bd/4f/58bd4fc9ebfccc1f2de419529bbf1a12.jpg';
- return '<div>'.
- sprintf('<img src="%s" width="75" style="float:left; margin:0 1em 1em 0;" />', $imageUrl).
- $html.
- '</div>';
- }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment