Note that there are some explanatory texts on larger screens.

plurals
  1. POWP PHP Loop doesn't display information at end
    primarykey
    data
    text
    <p>I have a very simple php loop here (see below) and would like the the two like and dislike counters to appear after the img class "yearofstudy". However the text does not appear after the image. Even if it is placed after the actual HTML.</p> <p>The Like and Dislike on Comments has to be inside tis function for it to work as it creates a WP loop where they display. Basically, I need help re-arranging this so the like and dislikes appear in the loop but after the image.</p> <p>Any help is greatly appreciated, I have been staring at this for hours and have looked every online and still yet to find anything.</p> <pre><code>// Add the comment meta (saved earlier) to the comment text // You can also output the comment meta values directly in comments template add_filter( 'comment_text', 'modify_comment'); function modify_comment( $text ){ $plugin_url_path = WP_PLUGIN_URL; if( $commenttitle = get_comment_meta( get_comment_ID(), 'title', true ) ) { $commenttitle = '&lt;strong&gt;' . esc_attr( $commenttitle ) . '&lt;/strong&gt;&lt;br/&gt;'; $text = $commenttitle . $text; } if( $commentrating = get_comment_meta( get_comment_ID(), 'rating', true ) ) { $commentrating = '&lt;p class="comment-rating"&gt; &lt;img src="'. $plugin_url_path . '/ExtendComment/images/'. $commentrating . 'star.gif" class="yearofstudy" /&gt;&lt;/p&gt;&lt;br /&gt;'; $text = $text . $commentrating; return $text; // LIKE AND DISLIKE ON COMMENTS if(function_exists('like_counter_c')) { like_counter_c('text for like'); } if(function_exists('dislike_counter_c')) { dislike_counter_c('text for dislike'); } } } </code></pre> <p>EDIT:</p> <p>Although the answers supplied by RecoveringSince2003 does work and makes the like and dislike display, it doesn't allow the functions to appear after the html image yearofstudy. It appears before and this is not what i am after. </p> <p>For an example see here, make sure you scroll down to see the comments/reviews: <a href="http://universitycompare.com/universities/anglia-ruskin-university" rel="nofollow">http://universitycompare.com/universities/anglia-ruskin-university</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload