This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include php tag | |
add_filter( 'schema_output', 'schema_wp_override_description_yoast_seo_12345' ); | |
/* | |
* Override Schema description value with Yoast SEO description | |
*/ | |
function schema_wp_override_description_yoast_seo_12345( $schema_output ) { | |
// get description value from Yoast SEO post meta | |
$desc = get_post_meta( get_the_ID(), '_yoast_wpseo_metadesc', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include php tag | |
add_filter('schema_output', 'schema_wp_extend_output_987345256'); | |
/** | |
* Extend / Override Schema Output | |
* | |
* @since 1.0 | |
*/ | |
function schema_wp_extend_output_987345256( $schema ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include php tag | |
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_7623456' ); | |
/** | |
* Add New type to Schema Types options | |
* | |
* @since 1.0 | |
*/ | |
function schema_wp_new_add_schema_type_7623456( $options ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include php tag | |
add_action('schema_wp_knowledge_graph_json', 'schema_wp_knowledge_graph_json_123456'); | |
/** | |
* Extend Schema Knowledge Graph JSON-LD output | |
* | |
* @return schema json-ld array | |
*/ | |
function schema_wp_knowledge_graph_json_123456( $schema ) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //* do not include php tag | |
function schema_wp_set_default_image_12345( $json ) { | |
// If image is already defiend, | |
// return our $json array and do not do anything | |
if ( isset($json['media']) && ! empty($json['media']) ) return $json; | |
// There is no image defined in Schema array, | |
// set default ImageObject url, width, and height |
NewerOlder