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 gist:2d8d08c587066f8e2f279e94ff415672
<?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-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-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 ) {
View schema-truncating-headlines.php
<?php //* do not include php tag
add_filter('schema_wp_filter_headline', 'truncating_headlines_chars_567545256');
/**
* Schema Plugin: Truncating Headlines by characters count
*
* @since 1.0
*/
function truncating_headlines_chars_567545256( $headline ) {
View schema-truncating-headlines.php
<?php //* do not include php tag
add_filter('schema_wp_filter_headline', 'truncating_headlines_words_567545256');
/**
* Schema Plugin: Truncating Headlines by words count
*
* @since 1.0
*/
function truncating_headlines_words_567545256( $headline ) {
View gist:9616a8f9d9b5fa885b23a78f1839afa5
<?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-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 ) {
You can’t perform that action at this time.