Skip to content

Instantly share code, notes, and snippets.

View schemapress's full-sized avatar

Schema.Press schemapress

View GitHub Profile
@schemapress
schemapress / schema-display-list-recipeInstructions.php
Created February 19, 2021 18:39
Display a list of Recipe Instructions with the Schema plugin for WordPress https://schema.press/docs-premium/add-schema-org-recipe/
<?php //* do not include php tag
/**
* Display Recipe Instructions
*
* @since 1.0.0
* @return null
*/
function schema_display_recipeInstructions_78239482379847() {
@schemapress
schemapress / schema-display-list-recipeIngredient.php
Last active February 17, 2021 15:55
Display a list of Recipe Ingredient with the Schema plugin for WordPress https://schema.press/docs-premium/add-schema-org-recipe/
<?php //* do not include php tag
/**
* Display Recipe Ingredient
*
* @since 1.0.0
* @return null
*/
function schema_display_recipeIngredient_78239482379847() {
@schemapress
schemapress / schema-plugin-add-social-profile.php
Created October 16, 2019 23:36
Schema Plugin: Add additional Social Profiles links to Knowledge Graph https://schema.press/downloads/schema/
<?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 ) {
<?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 January 26, 2019 01:08
Example: add support for new schema.org type in Schema Premium plugin https://schema.press/introducing-schema-premium/
<?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
<?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 ) {
<?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', '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 ) {
@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 ) {
@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 ) {