Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile

I can’t give more than a partial answer here, since the details might depend on the peculiarities of your theme and installation, including UM and how you’re using it. Without installing and cracking open UM, too, I’m not sure I could figure out why you’re getting the unexpected results you’re getting. However, if you want … Read more

Convert to shortcode?

Look into the add_shortcode function, which can be part of the plugin (although I don’t recommend modifying other’s plugins, since your changes will be overwritten if they send out an update. So you would add this function to your ‘child theme’ function.php function add_my_shortcode() { add_shortcode(‘your-shortcode-name’, ‘the_function_for_your_shortcode’); } add_action(‘init’, ‘add_my_shortcode’); ..and here is the function … Read more

dynamically create callback functions inside a for loop

Probably you can do it with args: ‘callback’ => benz_new_product_tab_content, ‘args’ => ‘_tabs_content_’ . $y And your function: function benz_new_product_tab_content($param, $args) { global $post; $table = end($args); $benz_tab_content = get_post_meta( $post->ID, $table, true ); if (strlen($benz_tab_content) > 0) { echo $benz_tab_content; } } One alternative is to create anonymous function like this: ‘callback’ => function() … Read more

Get all posts, regardless of status

You should write your request like this (“post_status” instead of “status”): $my_query = new WP_Query(‘post_type=testimonials&posts_per_page=-1&post_status=any’); All available post_statuses are: Default value is ‘publish’, but if the user is logged in, ‘private’ is added. Public custom statuses are also included by default. And if the query is run in an admin context (administration area or AJAX … Read more