Skip to content

Instantly share code, notes, and snippets.

<?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
@calliaweb
calliaweb / modify-tinymce-editor-to-remove-h1.php
Last active August 3, 2023 16:00
Modify TinyMCE editor to remove H1
<?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';
@calliaweb
calliaweb / add-date-title-to-genesis-date-archives.php
Last active August 29, 2015 14:00
Add date title to genesis date archives
<?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.
@calliaweb
calliaweb / add-pages-to-soliloquy-featured-content-slider.php
Last active August 29, 2015 13:56
Add static pages to Soliloquy featured content slider. See http://calliaweb.co.uk/soliloquy-featured-content-slider/ for more details.
@calliaweb
calliaweb / Add Custom Taxonomies to Post Meta
Created November 27, 2013 14:25
Modify Post Meta to add custom taxonomies Author Jo Waltham jo@calliaweb.co.uk Add function to your functions.php
/** Modify Post Meta to add custom taxs
* Author Jo Waltham jo@calliaweb.co.uk
* 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;