This file contains 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
/** Modify Post Meta to add custom taxs | |
* Author Jo Waltham [email protected] | |
* Add function to your functions.php | |
*/ | |
add_filter( 'genesis_post_meta', 'jmw_post_meta_filter' ); | |
function jmw_post_meta_filter($post_meta) { | |
if ( !is_single() ) // Only runs on single posts - remove if you want the output on archive pages | |
return; |
This file contains 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 include the opening php tag above | |
add_filter( 'soliloquy_output_single_item', 'jmw_soliloquy_add_custom_slides', 10, 5 ); | |
/** | |
* Filter the Soliloquy slide html to append another slide. Works with version 2 of Soliloquy. | |
* | |
* @link http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ | |
* | |
* @param string $slider_html Existing slide HTML. |
This file contains 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 include the opening php tag above | |
add_action( 'genesis_before_loop','jmw_add_archive_date_title', 15 ); | |
/** | |
* Add date headline to date archive pages. | |
* | |
* If we're not on a date archive page then nothing extra is displayed. | |
* | |
* The date is marked up as a level 1 heading. |
This file contains 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 include the opening php tag above | |
add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' ); | |
/* | |
* Modify TinyMCE editor to remove H1. | |
*/ | |
function tiny_mce_remove_unused_formats($init) { | |
// Add block format elements you want to show in dropdown | |
$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre'; |
This file contains 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 | |
/** | |
* Plugin Name: Remove H1 Format | |
* Plugin URI: http://calliaweb.co.uk/modify-tinymce-editor/ | |
* Description: A simple plugin to remove the H1 format from the WordPress TinyMCE editor. | |
* Version: 1.0.0 | |
* Author: Jo Waltham | |
* Author URI: http://calliaweb.co.uk/ | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains 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 include the opening php tag above | |
/** | |
* Helper function to determine if we're on a blog section of a Genesis site. | |
* | |
* @since 2.0.0 | |
* | |
* @param $archives_only set to false to return true on singular posts | |
* @return bool True if we're on any section of the blog. |
This file contains 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
.archive .one-third .entry-title, | |
.archive .one-fourth .entry-title, | |
.archive .one-sixth .entry-title, | |
.search .one-third .entry-title, | |
.search .one-fourth .entry-title, | |
.search .one-sixth .entry-title { | |
font-size: 18px; | |
text-align: center; | |
} |
This file contains 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 include the opening php tag above | |
add_action( 'genesis_entry_content', 'jmw_add_envira_gallery_after_content', 15 ); | |
/* | |
* Add the gallery after the end of the content | |
*/ | |
function jmw_add_envira_gallery_after_content() { | |
$gallery = get_post_meta( get_the_ID(), 'gallery' ); // 'gallery' is name of my ACF gallery field |
This file contains 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 | |
// If sub categories don't show products only show sub categories. | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'jmw_sub_categories_loop' ); | |
function jmw_sub_categories_loop() { | |
// Are there sub categories? | |
$term_object = get_queried_object(); | |
This file contains 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 include the opening php tag | |
add_filter( "genesis_structural_wrap-footer-widgets", 'jmw_filter_footer_widgets_structural_wrap', 10, 2); | |
/** | |
* Filter the footer-widgets context of the genesis_structural_wrap to add a div before the closing wrap div. | |
* | |
* @param string $output The markup to be returned | |
* @param string $original_output Set to either 'open' or 'close' | |
*/ |
OlderNewer