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 | |
//* Remove metaboxes in Genesis settings page | |
function afn_remove_metaboxes( $_genesis_theme_settings_pagehook ) { | |
remove_meta_box( 'genesis-theme-settings-breadcrumb', $_genesis_theme_settings_pagehook, 'main' ); | |
} | |
add_action( 'genesis_theme_settings_metaboxes', 'afn_remove_metaboxes' ); |
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 | |
//* Remove Jetpack Related Posts on THEMES CPT | |
function afn_jetpack_archive_no_related_posts( $options ) { | |
if ( is_post_type_archive( 'themes' ) ) { | |
$options['enabled'] = false; | |
} | |
return $options; | |
} | |
add_filter( 'jetpack_relatedposts_filter_options', 'afn_jetpack_archive_no_related_posts' ); |
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 | |
add_action( 'body_class', 'wpspeak_conditional_body_class'); | |
function wpspeak_conditional_body_class( $classes ) { | |
if ( is_page( array( 'page-1', 'page-2', 'page-3' ) ) ) { | |
$classes[] = 'my-custom-page'; | |
} | |
return $classes; | |
} |
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 | |
//* Conditionally add admin notes | |
function wpspeak_admin_notice(){ | |
global $pagenow; | |
if ( $pagenow == 'plugins.php' ) { | |
echo '<div class="updated"> | |
<p>This notice only appears on the plugins page.</p> |
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 | |
//* Remove "Private: " from Private Post Titles | |
function wpspeak_format_post_title($content) { | |
return '%s'; | |
} | |
add_filter('private_title_format', 'wpspeak_format_post_title'); |
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 | |
/* | |
* Set default attachment display settings, alignment, link to, size in wordpress | |
* @Url http://wpsnipp.com/index.php/functions-php/set-default-attachment-display-settings-alignment-link-size-wordpress/ | |
*/ | |
function wps_attachment_display_settings() { | |
update_option( 'image_default_align', 'left' ); | |
update_option( 'image_default_link_type', 'none' ); |
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 | |
//* Force auto-updates for WordPress plugins | |
add_filter( 'auto_update_plugin', '__return_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 | |
//* Rename fields on Job Submission form (WP Job Manager Plugin) | |
add_filter( 'submit_job_form_fields', 'wpspeak_submit_job_form_fields' ); | |
// You can see the fields which can be changed here: https://github.com/mikejolley/WP-Job-Manager/blob/v1.2.0/includes/forms/class-wp-job-manager-form-submit-job.php#L101 | |
function wpspeak_submit_job_form_fields( $fields ) { | |
// Here we target one of the job fields (job_title) and change it's label | |
$fields['job']['job_type']['label'] = "Level"; |
NewerOlder