• Chico

    (@blogginglife)


    Blaz,

    Thank you for providing this excellent plugin. I really like Rate my Post plugin.

    I would like to implement Rate my Post on AMP. My site uses theme’s feature to enable AMP instead of plugins.

    I read your post, [BETA] AMP Compatibility in version 2.3.0.

    If I add Rate my Post CSS to my site’s AMP page, will it work? or will additional code modifications/customizations be required to make it work?

    Just FY, I was thinking about giving a try by adding Rate my Post CSS to AMP template header.

    When I added the plugin CSS for AMP, error message “Expected PBRACE at line xx, col 5.” was displayed. The error line is the 2nd line in “.rmp-amp-rating”. (Pls see below)

      .rmp-amp-rating {
        --star-size: 3;  /* use CSS variables to calculate dependent dimensions later */
        padding: 0;  /* to prevent flicker when mousing over padding */

    Can I just ignore the error message, and will it work? I am not sure it will work just by adding CSS to AMP pages.

    Any comments and advice are appreciated.

    Thank you for your help and support in advance.

    Chico

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi there,

    at the moment the plugin supports only AMP and AMP for WP plugins. If neither of this plugins is present, it won’t show the AMP rating widget. Which theme do you use? If it’s a free theme I can check it out and see if it’s possible to add AMP support for it. Otherwise please check if the theme has a function to check if an AMP version of a post is being viewed. If so, I can give you a snippet and you can test it.

    As for the CSS, it’s from here: https://ampbyexample.com/advanced/star_rating/

    I also got some errors but everything worked fine in the development environment. Note that this is just an example of style and you should edit it so that it fits you website.

    Blaz

    Thread Starter Chico

    (@blogginglife)

    Blaz,

    Thank you very much for your reply. I really appreciate taking your time to answer to my post question.

    The Theme I am using is free, but it is primarily for Japanese. It uses own defined conditional tag for AMP page. It is not compatible with AMP and AMP for WP plugins. (The conditional tag is not is_amp_endpoint(). )

    I am using conditional tags to insert AdSense ad codes for standard pages and AMP specific ad codes for AMP pages.

    If you gave me a snippet, then I think I can test it.

    Thank you for sharing the CSS page on AMP by Example. It is same one as yours that I got some errors.

    Thank you again for your help.

    Chico

    p.s. I plan to share my site URL just in case for your review tomorrow. Right now, I am using AMP for WP for AMP pages, but I plan to change the theme.

    Plugin Support Blaz K.

    (@blazk)

    Hi Chico,

    if you have the conditional function you can try edit rate-my-post\public\inc\class-rate-my-post-public-helper.php after line 190 to add support for your theme. See here: https://gist.github.com/blaz-blazer/cd9a51c32971dcd9d88d0a6ba22380f5

    If you get it working I’ll add the support in the next version of the plugin.

    Let me know if it worked ??

    Blaz

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AMP support’ is closed to new replies.