Home › Forums › itempropWP plugin › Troubleshooting itempropWP › schema display 3 times
This topic contains 10 replies, has 2 voices, and was last updated by sirene 2 months, 3 weeks ago.
-
AuthorPosts
-
February 14, 2013 at 1:22 pm #87
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/
How i can solve this bug ?
February 16, 2013 at 6:50 pm #92please 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.
February 18, 2013 at 7:26 am #93Can you show which function is loaded 3 times ?
February 18, 2013 at 8:22 am #94I 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 ?
February 18, 2013 at 8:32 am #95plugin is attached to add_filter(‘the_content’) filter. So everywhere where it is used, will be inserted also.
February 18, 2013 at 9:33 am #96I’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
February 18, 2013 at 12:27 pm #97i 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
February 18, 2013 at 4:32 pm #98Hi!
thanks, @sirene, for #patch , will test and include in production.pre-release: https://github.com/rolandinsh/itempropwp/commit/4411f24822d11c874aa3b3b724e0c03711202a3c
February 18, 2013 at 4:35 pm #99The better solution would be to select for which content we want itemprop display when you have multiple content() on the same page.
February 18, 2013 at 4:56 pm #100for 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
February 19, 2013 at 12:39 pm #103Maybe 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
-
AuthorPosts
You must be logged in to reply to this topic.
-
instructions
by empo8860
1 month, 1 week ago
-
schema display 3 times
by sirene
2 months, 3 weeks ago
-
Auto Populate for RSS
by scoot
3 months ago
-
Rich Snippets for Events, Places and Video are needed
by rene1979
3 months, 1 week ago
-
multiple authors
by atreides
3 months, 1 week ago