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 shown above. Copy the code shown below. | |
//* Make forward facing links clickable | |
//* https://developer.wordpress.org/reference/functions/make_clickable/ | |
add_filter( 'the_content', 'make_clickable' ); |
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
// By default, when using Genesis' SEO settings (not a plugin like Yoast or Rankmath), the title and meta description will not show up and will not display the new title name on the browser tab. Code provided by ChatGPT, tested and works. | |
// Inject Genesis SEO title and meta description into WooCommerce Shop page | |
add_action('wp_head', 'custom_shop_page_meta', 1); | |
function custom_shop_page_meta() { | |
if (is_shop()) { | |
$shop_page_id = wc_get_page_id('shop'); | |
// Retrieve Genesis title and meta description | |
$shop_title = get_post_meta($shop_page_id, '_genesis_title', true); |
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
// Update the login logo with the custom header image | |
function custom_login_logo() { | |
// Get the header image from the Customizer | |
$header_image = get_header_image(); | |
if (!$header_image) { | |
return; | |
} | |
// Styles to replace the WordPress logo with the custom header image |
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
/* Genesis Simple Share - uses Genericons | |
--------------------------------------------- */ | |
/* Centers the icons */ | |
.share-before, .share-after { | |
overflow: auto; | |
text-align: center; | |
} | |
.sharrre { |
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 | |
//* Template Name: Blog | |
//* Show page content above posts | |
add_action( 'genesis_loop', 'genesis_standard_loop', 5 ); | |
genesis(); |
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
/* Create a page called Blog. | |
Go to Layout Settings. Add the word "blog" (without quotes) to the Custom Body Class, then Save. | |
Add the following code to the stylesheet or to the Additional CSS Box. | |
*/ | |
/* Blog Page Grid Layout | |
-----------------------------------------------------*/ | |
.blog .content .entry { | |
border:0; | |
float:left; |
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
//* Force Full Width Layout on Search Results Pages | |
function c8d_posts_full_layout() { | |
if( is_search () ){ | |
return 'full-width-content'; | |
} | |
} | |
add_filter( 'genesis_site_layout', 'c8d_posts_full_layout' ); |
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
function kia_unload_script() { | |
if ( function_exists( 'is_product' ) && is_product() ) { | |
wp_dequeue_script( 'wc-single-product' ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'kia_unload_script', 20 ); |
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
//* Add pagination to Genesis Author Archive | |
function author_posts_per_page( $query ) { | |
if (!is_admin() && is_author() ) | |
$query->set( 'posts_per_page', 5 ); | |
} | |
add_filter('parse_query', 'author_posts_per_page'); |
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
/* Set the alignment of the Genesis Simple Share Icons | |
-------------------------------------------------------- */ | |
.sharre-icon-wrap { | |
margin: 20px 0; | |
text-align: center; | |
} |
NewerOlder