• Plugin Support Blaz K.

    (@blazk)


    1. Filtering Strings

    Rate my Post allows you to override strings in rating widget with a filter. For example, if you have multiple custom post types and you want the strings to be tailored to each custom post type you can utilize the rmp_custom_strings filter. See example below:

    
    /*FILTER EXAMPLE
    the array has the following keys:
    rateTitle, rateSubtitle, rateResult, rateResult2, cookieNotice, noRating, afterVote, star1, star2 ,star3 ,star4 ,star5, socialTitle, socialSubtitle, feedbackTitle, feedbackSubtitle, feedbackText, feedbackNotice, feedbackButton, feedbackAlert, submitButtonText
    */
    
    function modify_rmp_strings( $stringsArray ) {
      if ( is_singular( 'recipe' ) ) { //modify only if it is custom post type of recipe
        $stringsArray['rateTitle'] = 'How delicious was this recipe?';
        $stringsArray['rateSubtitle'] = 'Click on a star to rate this recipe!';
        $stringsArray['afterVote'] = 'Thank you for rating this recipe';
        $stringsArray['socialTitle'] = 'As you found this recipe useful...';
        $stringsArray['feedbackTitle'] = 'How come you did not like this recipe?';
        $stringsArray['feedbackSubtitle'] = 'Can we improve this recipe?';
        $stringsArray['feedbackText'] = 'Give us some tips...';
      }
      return $stringsArray;
    }
    
    add_filter( 'rmp_custom_strings', 'modify_rmp_strings' );
    

    The snippet above will change the strings in rating widget only in the recipe custom post type. In similar manner you can override the strings for specific posts, pages etc.

    2. FontAwesome

    The plugin utilizes FontAwesome for icons (stars, thumbs, social media icons etc.). If you want to further improve the performance of the plugin you can load only the necessary css and fonts instead of the full FontAwesome library. To generate CSS and fonts you can use IcoMoon. Alternatively, you can download Rate my Post – Fast Load Icons plugin here: https://github.com/blaz-blazer/rate-my-post-fast-load-icons

    Remember to enable “Do not load FontAwesome” feature after enabling the Rate my Post – Fast Load Icons plugin.

    Credit for this feature goes to @douglasferraz89.

    More developer features will be available in the future ??

    • This topic was modified 6 years ago by Blaz K..
    • This topic was modified 6 years ago by Blaz K..
    • This topic was modified 6 years ago by Blaz K..
Viewing 3 replies - 16 through 18 (of 18 total)
  • Hello, @blazk,

    I have why something on the main now emerge stars in two places.
    https://yadi.sk/i/YG8nYlDTW7SJjQ
    https://pavel-repin.ru/
    I’d like to leave some alone. Better, of course, those at the top, but repaint them in orange.
    How can this be done? ??

    And as to leave only stars without numbers?

    • This reply was modified 5 years, 6 months ago by pavelrepin.

    Hey Blaz, is it possible to not include the plugin on all posts with certain post categories or tags?

    Plugin Support Blaz K.

    (@blazk)

    @jlvdaum,

    it is possible but requires some skills ?? I would include the widget directly in the template under conditions. Something like the snippet below:

    
    <?php if (!is_category( 'blue-cheese' )): ?>
      <?php echo do_shortcode('[ratemypost]'); ?>
    <?php endif; ?>
    
    

    That will for example exclude the widget from blue-cheese category ??

    Regards,
    Blaz

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘[Developers] Developer Features’ is closed to new replies.