• Resolved wellnesshome

    (@addwert)


    Hi there,

    when I disable the rating on a single post / page only the stars in the frontend disappear. The schema stays in the code.

    How could this be changed?

    Thank you very much

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor dudo

    (@dudo)

    Hello!

    Can you please try to upload this file with ftp?

    https://gist.github.com/Dudo1985/57e3ac81763cb1488caca50f8bab0abc

    this file has to be uploaded in wp-content/plugins/yet-another-stars-rating/lib and overwrite the default one.

    I never put this into the plugin because I’ve to do some test about the speed.

    Best,
    Dario

    Thread Starter wellnesshome

    (@addwert)

    Hi Dario,

    works perfect – thank you very much for this great plugin and your amazing support!

    Best,
    Alex

    Plugin Contributor dudo

    (@dudo)

    Glad to hear ??

    If you like yasr, can you please consider to leave a 5 stars rating review?

    Thank you ??

    • This reply was modified 5 years, 1 month ago by dudo.
    Thread Starter wellnesshome

    (@addwert)

    Sorry – but it seems as if this is taken all the schema from every page.
    Is that right?

    I was searching for a solution to only not embed the schema on some pages.

    Is there any way?

    Plugin Contributor dudo

    (@dudo)

    With that file, it will remove the schema to post or page that has not shortcode anymore, but should be available to post or page that still has.

    Does it work?

    Thread Starter wellnesshome

    (@addwert)

    It removes perfectly.

    but on pages where it should be displayed, it only shows the stars but not the schema like:

    class=”yasr-auto-insert-visitor”><!–Yasr Visitor Votes Shortcode–><div id=”yasr_visitor_votes_745″ class=”yasr-visitor-votes”><div id=”yasr-visitor-votes-rater-2e305fd15d843″ class=”yasr-rater-stars-visitor-votes” data-rater-postid=”745″
    data-rating=”4.3″ data-rater-starsize=”16″
    data-rater-readonly=”false” data-rater-nonce=”a2d1806566″ data-issingular=”true”></div><span id=”yasr-visitor-votes-container-after-stars-2e305fd15d843″
    class=’yasr-visitor-votes-after-stars-class’><span class=”yasr-total-average-container” id=”yasr-total-average-text_745″> [Gesamt:4    Durchschnitt: 4.3/5] </span><span class=”yasr-small-block-bold yasr-already-voted-text ”
    id=”yasr-user-vote-745″ data-yasr-already-voted=”5.0″>Du hast hier bewertet mit 5.0</span></span></div><!–End Yasr Visitor Votes Shortcode–></div>

    Plugin Contributor dudo

    (@dudo)

    Sorry, you’re right, I’ve just updated the file; can you please try to download and upload it again?

    Thread Starter wellnesshome

    (@addwert)

    Seems to work perfect now.

    Thank you for your great support

    Thread Starter wellnesshome

    (@addwert)

    Hi dudo,

    I have updated your wonderful plugin on one of my pages.
    Now the same problem occurs again.
    When I try to fix it with the GitHub version I receive a fatal error.

    It would be great if you could help again.

    Thank you

    Plugin Contributor dudo

    (@dudo)

    I’ve update the file, can you try again?

    Thread Starter wellnesshome

    (@addwert)

    It seems to work perfectly!

    Thank you very much

    Thread Starter wellnesshome

    (@addwert)

    @dudo
    turned out it did not work at all.

    Site was down with:
    Fatal error: Uncaught Error: Call to undefined function yasr_get_itemType() in /www/htdocs/xxx/xxx/wp-content/plugins/yet-another-stars-rating/lib/yasr-functions.php:417 Stack trace: #0 /www/htdocs/xxx/xxx/wp-includes/class-wp-hook.php(287): yasr_add_schema(‘<div style=”tex…’) #1 /www/htdocs/xxx/xxx/wp-includes/plugin.php(206): WP_Hook->apply_filters(‘<div style=”tex…’, Array) #2 /www/htdocs/xxx/xxx/wp-includes/formatting.php(3806): apply_filters(‘the_content’, ‘\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r…’) #3 /www/htdocs/xxx/xxx/wp-includes/class-wp-hook.php(287): wp_trim_excerpt(‘\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r…’, Object(WP_Post)) #4 /www/htdocs/xxx/xxx/wp-includes/plugin.php(206): WP_Hook->apply_filters(”, Array) #5 /www/htdocs/xxx/xxx/wp-includes/post-template.php(427): apply_filters(‘get_the_excerpt’, ”, Object(WP_Post)) #6 /www/htdocs/xxx/xxx/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-opengraph.php(150): get_the_excerpt() #7 /www/ in /www/htdocs/xxx/xxx/wp-content/plugins/yet-another-stars-rating/lib/yasr-functions.php on line 417

    Plugin Contributor dudo

    (@dudo)

    Did you downgrade the plugin?

    Thread Starter wellnesshome

    (@addwert)

    I thought I was using the latest version – but I wasn′t.

    Seems to work perfect again after updating.

    Sorry for my request and thank you so much for your help

    Plugin Contributor dudo

    (@dudo)

    In the next version, I will add this check by default, and schema info will be returned only if a yasr shortcode is in the post.

    Have a nice weekend!

    Dario

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘disable schema on selected pages’ is closed to new replies.