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 | |
// Don't include the PHP tag. | |
/** | |
* Adjust $excluded_post_types : array( 'post_type' ); | |
* Adjust $excluded_taxonomies : array( 'taxonomy' ); | |
* Adjust $exclude_from_singular : false/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 | |
//! Don't include the php tag. | |
add_filter( 'the_seo_framework_custom_post_type_support', function( $support ) { | |
return array_diff( $support, array( 'editor' ) ); | |
} ); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div { | |
padding: 12px 0; | |
font-weight: 600; | |
font-size: 14px; | |
vertical-align: middle; | |
display: inline-block; |
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 | |
function if_( $value ) { | |
return new class( (bool) $value ) { | |
public $run, $and; | |
public $cb = []; | |
function __construct( $run ) { $this->run = $run; } | |
function __destruct() { | |
foreach ( $this->cb as $cb ) { | |
$cb ? $cb() : null; |
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 | |
//* Don't include the PHP tag. | |
add_action( 'the_seo_framework_init', function() { | |
//! Set shortcodes here. | |
function get_tsf_excluded_shortcodes() { | |
return array( | |
'my-first-shortcode', | |
'my-first-shortcode', |
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 | |
//* Don't include the PHP tag. | |
add_action( 'after_setup_theme', function() { | |
$exclusions = array( | |
'/sample-page', | |
'/forums', | |
'/replies', | |
); |
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 | |
// Don't include the PHP tag. | |
add_action( 'after_setup_theme', function() { | |
remove_action( 'init', 'The_SEO_Framework\\_wpforo_fix_page' ); | |
add_action( 'the_seo_framework_init', function() { | |
if ( ! function_exists( 'wpforo_feature' ) || ! function_exists( 'is_wpforo_page' ) ) | |
return; |
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 USE THIS! It's condemned by Google. | |
// Usage: Add %%year%%, %%month%%, and/or %%day%% to custom meta titles in the SEO framework, | |
// and magically see them transform into their respective values. | |
add_filter( 'the_seo_framework_title_from_custom_field', function( $title, $args ) { | |
$params = [ |
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 | |
// Ref: https://github.com/sybrew/The-SEO-Framework-Extension-Manager/blob/2d70d5a141491209340b72a8cefeb574dd00b538/extensions/essentials/focus/trunk/inc/classes/admin.class.php#L99-L128 | |
/** | |
* Adds my custom fields to the Focus parser. | |
* | |
* @param array $elements | |
* @return array | |
*/ |
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 | |
// Don't include the PHP tag in existing files. | |
// Requester: https://wordpress.org/support/topic/filter-to-remove-blogname-from-all-posts-or-other-post-type/ | |
// Where do I place filters? See: https://tsf.fyi/docs/filters#where | |
/** | |
* Adjust The SEO Framework title branding. | |
* |