ورود

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : مشکل برادکرامپ یواست سئو



elan
June 16th, 2018, 23:03
سلام دوستان

من براد کرامپ یواست سئو رو توی سایت فعال کردم اما مشکل اینه که توی validator html این ارور رو نشون میده:

Attribute xmlns:v not allowed here

که برای حلش توی فانکشن این کدها رو گذاشتم



add_filter ('wpseo_breadcrumb_output','bybe_crumb_v_fix');fun ction bybe_crumb_v_fix ($link_output) { $link_output = preg_replace(array('#<span xmlns:v="http://rdf.data-vocabulary.org/\#">#','#<span typeof="v:Breadcrumb"><a href="(.*?)" .*?'.'>(.*?)</a></span>#','#<span typeof="v:Breadcrumb">(.*?)</span>#','# property=".*?"#','#</span>$#'), array('','<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="$1" itemprop="url"><span itemprop="title">$2</span></a></span>','<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">$1</span></span>','',''), $link_output); return $link_output;}


add_filter( 'wpseo_breadcrumb_single_link', 'bybe_crumb_fix' , 10, 2 );function bybe_crumb_fix( $output, $crumb ){ if ( is_array( $crumb ) && $crumb !== array() ) { if( strpos( $output, '<span class="breadcrumb_last"' ) !== false || strpos( $output, '<strong class="breadcrumb_last"' ) !== false ) { $output = '<a property="v:title" rel="v:url" href="'. $crumb['url']. '" >'; $output.= $crumb['text']; $output.= '</a>'; } else { $output .= "</span>"; } } return $output;}


اما توی structured data testing ---------->

@type رو ارور نشون میده که میگه خالی هست نمیدونم چی کار کنم. کسی میدونه چه کاری باید انجام بدم تا این ارور رفع بشه.