geminilabs

Untitled

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