wp menu list --format=ids | xargs wp menu delete
wp post list --post_type='post-type-here' --format=ids | xargs wp post delete --force
<?php | |
add_filter( 'genesis_entry_title_wrap', 'custom_homepage_title_to_h2' ); | |
/** | |
* Set page title to h2 on a static homepage if Genesis SEO is not in use. | |
* | |
* @param string $wrap The original wrap. | |
* @return string The new wrap. | |
*/ | |
function custom_homepage_title_to_h2( $wrap ) { | |
if ( is_front_page() && ! is_home() && ! genesis_seo_active() ) { |
MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.
Including them in this way isn't always possible or easy with WordPress.
The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.
To use it, modify the baseUrl
, uuid
, and lid
attributes with the ones from the original popup script that MailChimp supplies.
To make the Mac titlebar transparent in IntelliJ IDEA, CLion, Rider, PhpStorm, WebStorm, and other JetBrains products:
ide.mac.transparentTitleBarAppearance=true
It should then take on the base colour of your theme.
<?php | |
// Omit the opening <?php above when adding this to your active theme's functions.php. | |
add_filter( 'genesis_footer_output', 'custom_genesis_do_footer_unmodified' ); | |
/** | |
* Outputs Genesis footer text without calling `wp_kses_post()` | |
* to strip attributes for security purposes. | |
*/ | |
function custom_genesis_do_footer_unmodified() { | |
$footer_text = genesis_get_option( 'footer_text' ); |
<?php | |
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts | |
// https://wordpress.org/plugins/genesis-simple-share/ | |
// Add the code below to your active theme's functions.php file, | |
// or use in a site-specific plugin. | |
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share. | |
add_shortcode( 'social-icons', 'gss_shortcode' ); |
<?php | |
/** | |
* Count widgets in a given sidebar, taking WPML language switching into account. | |
* | |
* Assumes widget languages are switched with the WPML String Translation or WPML Widgets plugins. | |
* | |
* @param string $id The sidebar ID. | |
* | |
* @return int The count of widgets in the sidebar. |
I hereby claim:
To claim this, I am signing this object:
<?php | |
add_filter( 'genesis_post_title_output', 'custom_wrap_singular_titles_with_links', 10, 3 ); | |
/** | |
* Wrap the post title with a link on singular entries. | |
* | |
* @param string $output The original title output (title content and tags). | |
* @param string $wrap The title tag. | |
* @param string $title The content of the title tag. | |
* @return string The new title output. | |
*/ |
// Add genesis layout classes to the Block Editor. | |
// File lives in the theme's /js/ folder. | |
wp.domReady(function () { | |
yourTheme.updateLayoutClass(); | |
var layouts = document.querySelector(".genesis-layout-selector"); | |
if( layouts ) { | |
layouts.addEventListener("input", function (e) { | |
yourTheme.updateLayoutClass(); |