Skip to content

Instantly share code, notes, and snippets.

Schema.Press schemapress

Block or report user

Report or block schemapress

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View schema-wp-output-category-enabled.php
<?php //* do not include php tag
// Disable CollectionPage schema output on Categories
add_filter( 'schema_wp_output_category_enabled', '__return_false' );
// Disable CollectionPage schema output on Tags
add_filter( 'schema_wp_output_tag_enabled', '__return_false' );
View schema-acf-field-post-type-select-choices.php
<?php //* do not include php tag
add_filter( 'schema_acf_field_post_type_select_choices', 'schema_acf_field_post_type_select_choices_add_product_45263542' );
/**
* Schema Premium Plugin: Add missing post type "product" to Locations post type select choices
*
* @since 1.0.0
*/
function schema_acf_field_post_type_select_choices_add_product_45263542( $post_types ) {
@schemapress
schemapress / schema-plugin-add-social-profile.php
Created Oct 16, 2019
Schema Plugin: Add additional Social Profiles links to Knowledge Graph https://schema.press/downloads/schema/
View schema-plugin-add-social-profile.php
<?php //* do not include php tag
add_filter( 'schema_wp_knowledge_graph_json', 'add_social_to_schema_wp_knowledge_graph_json_567656765' );
/**
* Schema Premium Plugin: Add additional Social Profiles links to Knowledge Graph
*
* @since 1.0.0
*/
function add_social_to_schema_wp_knowledge_graph_json_567656765( $schema ) {
@schemapress
schemapress / schema-premium-add-type.php
Last active Jan 26, 2019
Example: add support for new schema.org type in Schema Premium plugin https://schema.press/introducing-schema-premium/
View schema-premium-add-type.php
<?php //* do not include php tag
/**
* @package Schema Premium - Class Schema New Type
* @category Core
* @author Hesham Zebida
* @version 1.0.0
*/
// Exit if accessed directly
View schema-author-url-remove.php
<?php //* do not include php tag
add_filter('schema_wp_author', 'remove_author_url_markup_588877256');
/**
* Schema Plugin: Remove Author URL since it has the username id exposed.
*
* @since 1.0
*/
function remove_author_url_markup_588877256( $author ) {
View schema-remove-datePublished.php
<?php //* do not include php tag
add_filter('schema_output', 'remove_datePublished_markup_588545256');
/**
* Schema Plugin: Remove datePublished markup on BlogPosting
*
* @since 1.0
*/
function remove_datePublished_markup_588545256( $schema ) {
View schema-author-output-modify.php
<?php //* do not include php tag
add_filter( 'schema_wp_author', 'schema_author_output_modify_8198771356' );
/**
* Modify The Author Schema Markup in Schema Plugin
*
* @param array $author
* @return array
*/
function schema_author_output_modify_8198771356( $author ) {
View schema-yoast-seo-headline-description.php
<?php //* do not include php tag
add_filter( 'schema_output', 'schema_wp_override_description_yoast_seo_5636346455' );
add_filter( 'schema_about_page_output', 'schema_wp_override_description_yoast_seo_5636346455' );
add_filter( 'schema_contact_page_output', 'schema_wp_override_description_yoast_seo_5636346455' );
/*
* Pull Schema Title and Description values from Yoast SEO
*/
function schema_wp_override_description_yoast_seo_5636346455( $schema_output ) {
View schema-blog-output-remove.php
<?php //* do not include php tag
add_filter( 'schema_blog_output', 'schema_blog_output_remove_8987716235' );
/**
* Remove Schema Plugin markup for Blog on home page
*
* @param array $schema
* @return array
*/
function schema_blog_output_remove_8987716235( $schema ) {
@schemapress
schemapress / schema-wp-override-description-yoast-seo.php
Last active Oct 3, 2018
Override Schema description value with Yoast SEO description https://schema.press
View schema-wp-override-description-yoast-seo.php
<?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);
You can’t perform that action at this time.