WordPress.org

Forums

WP-PostRatings
[Ratings] conflict with other shortcodes used in a page (4 posts)

  1. Expana
    Member
    Posted 3 years ago #

    Hi,

    I noticed that (probably after the latest plugin update) it conflicts with shortcodes.

    What happens:
    If there are any shortcodes used in a page (eg. [caption] or any custom shortcodes) and if I insert[ratings]` to the page, then on web there is some text after the ratings-stars.

    Looks like it takes first few words from the beginning of the article and duplicates them below stars.

    If the page has only [ratings] in the code, the page displays normally.

    If the page does not have [ratings], only other shortcodes, it displays normally as well.

    Example:
    Weird text below stars (scroll to the bottom of the article):
    http://ozzicat.com.au/cat-collection/cat-artists/cat-artist-laurel-burch/

    No weird text (I removed any shortcodes except ratings):
    http://ozzicat.com.au/cat-info/cat-care/does-smoking-affect-cats/

    What could that be?

    All my articles now look weird because of this :(

    Thanks!
    Natalie

    http://wordpress.org/extend/plugins/wp-postratings/

  2. J-Reese
    Member
    Posted 3 years ago #

    I am having this same issue with a site right now. It's a custom theme with a lot of different shortcode in it - not sure if that matters or not but as Expana said; if [ratings] is the only shortcode used then it is fine but if you use any other shortcode it results in the blog content/page content to be repeated after the rating.

    Just updated to WP 3.4 as well as a few other plugin updates.

  3. Expana
    Member
    Posted 3 years ago #

    Hi J-Reese,
    Thanks for sharing, so it's not only me! :)

    I noticed that if I have only [caption] in the text, then ratings display normally.

    I'm thinking about using another plugin for ratings. If you are going to use another one, please share which one you chosen.

    Cheers,
    Natalie

  4. Expana
    Member
    Posted 3 years ago #

    Ok, guys, I think I found the reason for that behaviour!

    I looked at the generated page source and at
    plugins/wp-postratings/wp-postratings.php file.
    In the file there is a line:

    <meta itemprop="description" content="'.$post_excerpt.'">

    This gave me a clue about the reason - shortcodes insert into that post_excert!

    I opened a post in wordpress admin and entered a plain text into "Excerp" text area. Saved, and this fixed that bug!

    I tried it only with 1 post, will do it with others.
    Try it, hopefully it works for you!

    Cheers,
    Nat

    (I almost uninstalled it! Just decided to give it a last try :-D)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic