Product.<\/strong> Un producto o servicio ofertado. Por ejemplo: un par de zapatos, una entrada de concierto, alquiler de coches, un corte de pelo, o un episodio de una serie en streaming online.<\/li><\/ul>\n\n\n\nNos ofrece un total de 1022<\/strong> esquemas diferentes, por lo que podemos darnos cuenta de la versatilidad para utilizar dichos esquemas.<\/p>\n\n\n\n<\/span>Ejemplo Schema para Recetas<\/span><\/h2>\n\n\n\nadd_action( 'wp_head', 'cmk_add_schema_pages', 20 );\n\/**\n * Shows Schema depeding of post type in header with LD JSON\n *\n * @return void\n *\/\nfunction cmk_add_schema_pages() {\n $post_id = get_the_ID();\n $cook_time = get_post_meta( $post_id, 'rec_tiempo', true );\n $prep_time = get_post_meta( $post_id, 'rec_tiempo', true );\n $ingredients = get_post_meta( $post_id, 'rec_ingredient', false );\n $recipe_inst = wp_strip_all_tags( get_post_meta( $post_id, 'rec_preparacion', true ) );\n $recipe_yield = get_post_meta( $post_id, 'rec_personas', true );\n\n if ( is_singular( 'receta' ) ) {\n $sch = '\n<script type=\"application\/ld+json\"> \n {\n \"@context\": \"http:\/\/schema.org\",\n \"@type\": \"Recipe\",\n \"author\": \"David Perez\",\n \"cookTime\": \"PT' . $cook_time . 'M\",\n \"datePublished\": \"2009-05-08\",\n \"description\": \" ' . get_the_excerpt() . '\",\n \"image\": \"' . get_the_post_thumbnail_url() . '\",\n \"recipeIngredient\": [';\n if ( is_array( $ingredients ) ) {\n foreach ( $ingredients[0] as $ingredient ) {\n $sch .= '\" ' . $ingredient . '\",';\n }\n }\n $sch .= '],\n \"prepTime\": \"' . $prep_time . '\",\n \"recipeInstructions\": \"' . $recipe_inst . '\",\n \"recipeYield\": \"' . $recipe_yield . ' persons\",\n \"suitableForDiet\": \"http:\/\/schema.org\/LowFatDiet\"\n }\n<\/script>';\n\n echo $sch;\n } \/\/ Recipe schema\n}\n<\/code><\/pre>\n\n\n\n<\/pre>\n\n\n\n<\/span>Ejemplo Esquema Organizaci\u00f3n<\/span><\/h2>\n\n\n\nadd_action( 'wp_head', 'cmk_add_schema_home_page', 20 );\n\/**\n * Shows Schema depeding of post type home_page in header with LD JSON\n *\n * @return void\n *\/\nfunction cmk_add_schema_home_page() {\n\n if ( is_front_page() || is_home() ) {\n $sch = '\n<script type=\"application\/ld+json\">\n{\n \"@context\": \"http:\/\/schema.org\",\n \"@type\": \"Organization\",\n \"address\": {\n \"@type\": \"PostalAddress\",\n \"addressLocality\": \"Granada, Espa\u00f1a\",\n \"postalCode\": \"18006\",\n \"streetAddress\": \"Calle Jose Luis P\u00e9rez Pujadas, 6 Edificio Forum Oficina B29\"\n },\n \"email\": \"info@closemarketing.es\",\n \"url\": \"https:\/\/www.closemarketing.es\/\",\n \"description\": \"Agencia de Marketing Online, Dise\u00f1amos Web en WordPress para Granada y M\u00e1laga.\",\n \"taxID\": \"ESB19618909\",\n \"employee\": [\n {\n \"@type\": \"Person\",\n \"name\": \"David P\u00e9rez\"\n },\n {\n \"@type\": \"Person\",\n \"name\": \"Sacra J\u00e1imez\"\n }\n ],\n \"member\": [\n {\n \"@type\": \"Organization\",\n \"name\": \"AJE Granada\"\n },\n {\n \"@type\": \"Organization\",\n \"name\": \"WordPress Granada\"\n }\n ],\n \"name\": \"Closemarketing\",\n \"telephone\": \"+34858958383\"\n}\n<\/script>';\n echo $sch;\n } \/\/ home_page schema\n}\n<\/code><\/pre>\n\n\n\n<\/span>Ejemplo Esquema Cursos<\/span><\/h2>\n\n\n\nadd_action( 'wp_head', 'cmk_add_schema_courses', 20 );\n\/**\n * Shows Schema depeding of post type in header with LD JSON\n *\n * @return void\n *\/\nfunction cmk_add_schema_courses() {\n if ( is_singular( 'formacion' ) ) {\n $post_id = get_the_ID();\n $price_raw = get_post_meta( $post_id, '_listing_price', true );\n $time_raw = get_post_meta( $post_id, 'for_dura', true );\n $time = substr_replace( $time_raw, '', -1 );\n if ( date( m ) > 6 ) {\n $year_start = date( 'Y' );\n $year_end = date( 'Y' ) + 1;\n } else {\n $year_start = date( 'Y' ) - 1;\n $year_end = date( 'Y' );\n }\n $start_date = $year_start . '-09-01';\n $end_date = $year_end . '-06-20';\n $sch = '<script type=\"application\/ld+json\">\n{\n \"@context\": \"http:\/\/schema.org\/\",\n \"@id\": \".\/\",\n \"@type\": \"Course\",\n \"name\": \"' . get_the_title( $post_id ) . '\",\n \"description\": \"' . get_the_excerpt( $post_id ) . '\",\n \"hasCourseInstance\": [\n {\n \"@type\": \"CourseInstance\",\n \"name\": \"' . get_the_title( $post_id ) . '\",\n \"location\": {\n \"@type\": \"Place\",\n \"address\": {\n \"@type\": \"PostalAddress\",\n \"addressLocality\": \"Granada\",\n \"addressRegion\": \"ESP\"\n }\n },\n \"description\": \"' . get_the_excerpt( $post_id ) . '\",\n \"startDate\": \"' . $start_date . '\",\n \"startDate\": \"' . $end_date . '\",\n \"timeRequired\": \"' . $time . '\",\n \"about\": \"' . get_post_meta( $post_id, 'for_ncursos', true ) . '\"\n }\n ]\n}\n<\/script>';\n\n echo $sch;\n } \/\/ Course schema\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"M\u00e9todo para realizar Schemas en tu p\u00e1gina web realizada en WordPress. Es el resumen de una charla realizada en la WordCamp Chiclana 2020.<\/p>\n","protected":false},"author":1,"featured_media":2567,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"Crea Schemas sin Plugins en WordPress: Charla WordCamp Chiclana","_seopress_titles_desc":"M\u00e9todo para realizar Schemas en tu p\u00e1gina web realizada en WordPress. Es el resumen de una charla realizada en la WordCamp Chiclana 2020.","_seopress_robots_index":"","inline_featured_image":false,"footnotes":""},"categories":[169],"tags":[],"class_list":["post-2520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-talks"],"_links":{"self":[{"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/posts\/2520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/comments?post=2520"}],"version-history":[{"count":0,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/posts\/2520\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/media\/2567"}],"wp:attachment":[{"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/media?parent=2520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/categories?post=2520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidperezgar.com\/en\/wp-json\/wp\/v2\/tags?post=2520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}