Skip to content

Instantly share code, notes, and snippets.

View schemapress's full-sized avatar

Schema.Press schemapress

View GitHub Profile
<?php //* do not include php tag
/*
* A few ways to disable Schema plugin breadcrumbs json-ld output
*
* @since 1.6.9.5
*/
//------------------- (1)
//
@schemapress
schemapress / schema_wp_markup_output_in_content.php
Created October 25, 2017 20:09
Add schema.org markup generated by Schema plugin to the content https://schema.press/
<?php //* do not include php tag
add_filter('the_content','my_schema_wp_markup_output_in_content_6876867');
/**
* Add schema.org markup generated by Schema plugin to the content
*
* return string
*/
function my_schema_wp_markup_output_in_content_6876867( $content ) {
<?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 ) {
<?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' );
<?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 ) {
@schemapress
schemapress / schema-truncating-headlines.php
Created July 14, 2018 11:34
Truncating Headlines by characters count in Schema Plugin https://schema.press/docs/truncating-headlines/
<?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 ) {
@schemapress
schemapress / schema-blog-output-remove.php
Created November 13, 2018 00:56
Remove Schema Plugin markup for Blog on home page https://schema.press/docs/remove-blog-markup/
<?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 ) {
<?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 ) {
<?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 ) {
<?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 ) {