• Resolved aseverirene

    (@aseverirene)


    Hi there,

    Thanks for this marvelous plugin.
    I’m using the Hueman theme, with NimblePageBuilder. I would to show the Widget Recent Reviews, however the widget shows book review content without HTML (stripped all tags)-code and without a Read More button… As shown here:

    <?php echo '<p>' . mb_substr( wp_strip_all_tags( strip_shortcodes( $review->get_the_rcno_book_review_content( $review_id ) ), true ), 0, $char_count ) . '</p>'; ?>

    I would to see the review title, some content and a read more button. Would that be possible with this widget?

    Looking forward to hearing from you.

    Kind regards,
    Irene

    The page I need help with: [log in to see the link]

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author Kemory Grubb

    (@w33zy)

    You could, like so…

    function rcno_change_recent_reviews_widget_content( $content, $post_id ) {
    	$length = 10; // word count
    	$output = get_post( $post_id )->post_content; // get_post( $post_id )->post_excerpt;
    	$output = strip_shortcodes( strip_tags( $output ) );
    	$output = preg_split( '/\b/', $output, $length * 2 + 1 );
    	$waste  = array_pop( $output );
    	$output = implode( $output );
    	$output .= '<br>'; // remove if necessary
    	$output .= '<a href="' . get_the_permalink( $post_id ) . '">';
    	$output .= 'Read more';
    	$output .= '</a>';
    
    	return $output;
    }
    add_filter( 'rcno_recent_reviews_content', 'rcno_change_recent_reviews_widget_content', 10, 2 );
    Thread Starter aseverirene

    (@aseverirene)

    Splendid… Thank you very much. The readers will certainly appreciate this. ??

    Thread Starter aseverirene

    (@aseverirene)

    Hello @Kemory,

    I think I may have a request for a new feature for this widget. Would you be so kind to add a pagination – underneath – to the recent review widget?

    Thanks in advance.

    Kind regards,
    Irene

    Plugin Author Kemory Grubb

    (@w33zy)

    Hello again @aseverirene

    Adding the kind of pagination you have in mind to the widget would involve re-writing to be JS/AJAX based. IMHO, implementation aside, that would be a bit too much of a change from what I had in mind for this simple widget.

    I already have a major re-write planned so this would be too much right now.

    Thread Starter aseverirene

    (@aseverirene)

    Hi Kemory,

    Another request from my clients…
    Would it be possible to make the cover in above widget clickable, as title is also clickable??

    My clients won’t be needing the read-more button, after all.

    Thanks in advance.
    Kind regards,

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Widget Recent Reviews’ is closed to new replies.