SimpleMediaCode Community

forums, feedbacks, and so social

Home Forums itempropWP plugin Troubleshooting itempropWP schema display 3 times

This topic is: not resolved

Tagged: ,

This topic contains 10 replies, has 2 voices, and was last updated by  sirene 1 year, 8 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #87

    sirene
    Participant
    Post count: 15

    Hi,

    thanks for you great plugin but i notice a bug with my website. I use woocommerce as plugin and WPML.

    If you check my website, you will see the schema display 3 times :

    http://www.ipo-sa.com/prod/panel-pc-atelier/vitus-12sda/

    http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.ipo-sa.com%2Fprod%2Fpanel-pc-atelier%2Fvitus-12sda%2F&html=

    How i can solve this bug ?

    • This topic was modified 1 year, 8 months ago by  sirene.
    • This topic was modified 1 year, 8 months ago by  sirene.
    • This topic was modified 1 year, 8 months ago by  sirene.
    • This topic was modified 1 year, 8 months ago by  sirene. Reason: bug with html tag
    #92

    Rolands Umbrovskis
    Key Master
    Post count: 12

    please check Your WordPress theme. I see that content output on single page is multiple times.

    Plugin is attached to singular post (or any custom post type) content. So it might be, that there are several post type outputs.

    Will check for WooCommerce support/compatibility .

    Works well with WPML, as I am using it myself.

    #93

    sirene
    Participant
    Post count: 15

    Can you show which function is loaded 3 times ?

    #94

    sirene
    Participant
    Post count: 15

    I use custom post widget bloc in my header, that’s why i think i  got a bug. Do you know function to disable content output from itemprop ?

    #95

    Rolands Umbrovskis
    Key Master
    Post count: 12

    plugin is attached to add_filter(‘the_content’) filter. So everywhere where it is used, will be inserted also.

    Source: https://github.com/rolandinsh/itempropwp

    #96

    sirene
    Participant
    Post count: 15

    I’m confusing, it’s shortcode ui i’m using as plugin http://wordpress.org/extend/plugins/shortcodes-ui/Thanks, i’m looking how i can disable it

    #97

    sirene
    Participant
    Post count: 15

    i found solution to fix the bug :

    in public function ipwp_the_content_filter($content) {
    add just after : static $done_ipwp_post = FALSE;

    just before $content = $content.$ipwp_contentx;
    add if ( $done_ipwp_post ){ return $content; }

    add beetween $content = apply_filters(‘itempropwp_article_content’, $content); and return $content; this code ->  $done_ipwp_post = TRUE;

    add just before the la return $content; this code -> $done_ipwp_post = TRUE;

    Now, the $ipwp_contentx is loading just one time and not multiple time if you have more than one the_content(); in your page

    #98

    Rolands Umbrovskis
    Key Master
    Post count: 12

    Hi!
    thanks, @sirene, for #patch , will test and include in production.

    pre-release: https://github.com/rolandinsh/itempropwp/commit/4411f24822d11c874aa3b3b724e0c03711202a3c

    #99

    sirene
    Participant
    Post count: 15

    The better solution would be to select for which content we want itemprop display when you have multiple content() on the same page.

    #100

    Rolands Umbrovskis
    Key Master
    Post count: 12

    for which content we want itemprop display

    Will need to lookup how to determinate such thing. And And should it be in core or can be filtered by actions or filters

    #103

    sirene
    Participant
    Post count: 15

    Maybe an another solution is loading the itemprop in another place as header or footer. I don’t know if there are an incidence for google if itemprop are not locating in the content ?

    Other solution, loading itemprop using the main content from custom post type or identify the id and create conditional action

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.