Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

schema markup pages help

Home / Forums / Virtue Theme / schema markup pages help

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
August 17, 2016 at 4:54 pm

pulled this out of custom php and want to modify, the head of pages from WebPage Or WebsSite to mor custom schema, want to add to functions can i deque the original (or echo something like these in place) and add this tofunctions to output specified type based on a structue something like below, so i can hit product pages with Product, ect indvidualy?

cheers, Lee

/**
* Schema type
*/
/*
function kadence_html_tag_schema() {
$schema = '

if(is_home() ) {
$type = "LocalBusiness";
} else if(is_woocommerce() || is_singular() ) {
$type = "LocalBusiness";
} else if(is_woocommerce() || is_product_category() ) {
$type = "LocalBusiness";
} else if(is_category() ) {
$type = "LocalBusiness";
} else if( is_post_type_archive()) {
$type = "LocalBusiness";
} else if( is_page_template('page-contact.php') ) {
$type = 'ContactPage';
} elseif( is_author() ) {
$type = 'ProfilePage';
} elseif( is_search() ) {
$type = 'SearchResultsPage';
} else {
$type = 'WebPage';
}

echo apply_filters('kadence_html_schema', 'itemscope="itemscope" itemtype="' . esc_attr( $schema ) . esc_attr( $type ) . '"' );
}*/

  • The forum ‘Virtue Theme’ is closed to new topics and replies.