Skip to content

Instantly share code, notes, and snippets.

Brad Dalton braddalton

Block or report user

Report or block braddalton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View button.html
<a href="https://www.w3schools.com" class="button">Link Button</a>
@braddalton
braddalton / front-page.php
Created Dec 8, 2019
Display Posts In One Category On Front Page of Genesis
View front-page.php
<?php
/**
* @author - Brad Dalton
* @link - https://wpsites.net/web-design/display-posts-in-one-category-on-front-page-of-genesis-theme/
* @description - This file adds a custom template which displays posts in Category I.D 007 only
*
* @author Brad Dalton
* @package Customizations
*/
@braddalton
braddalton / hero-section.php
Last active Dec 8, 2019
Open Academy Pro hero buttons in new window https://wp.me/p1lTu0-iM9
View hero-section.php
if ( $button_primary_text ) {
echo '<a class="button primary" href="' . esc_html( $button_primary_url ) . '" target="_blank">' . $button_primary_text . '</a>';
}
if ( $button_secondary_text ) {
echo '<a class="button text" href="' . esc_html( $button_secondary_url ) . '" target="_blank">' . $button_secondary_text . '</a>';
}
@braddalton
braddalton / functions.php
Last active Nov 28, 2019
Remove Essence Footer CTA From WooCommerce Pages https://wp.me/p1lTu0-hIT
View functions.php
add_action( 'genesis_before_footer', 'essence_footer_cta', 17 );
function essence_footer_cta() {
genesis_widget_area(
'footer-cta',
array(
'before' => '<div id="footer-cta" class="footer-cta"><div class="wrap"><div class="widget-area">',
'after' => '</div></div></div>',
) );
View style.css
@media only screen and (max-width: 600px) {
.woocommerce-shop-page ul.products li.product {
width: 100%!important;
float: none;
}
}
View functions.php
add_action( 'genesis_footer_output', 'filter_genesis_footer_links' );
function filter_genesis_footer_links() {
$text = sprintf( '[footer_copyright before="%s "] &#x000B7; [footer_childtheme_link before="" after=" %s"] [footer_genesis_link url="https://www.studiopress.com/" before=""] &#x000B7; [footer_wordpress_link] &#x000B7; [footer_loginout]', __( 'Copyright', 'genesis' ), __( 'on', 'genesis' ) );
$creds = $text ? sprintf( '<div class="creds"><p>%s</p></div>', $text ) : '';
$output = $creds;
if ( genesis_html5() ) {
View functions.php
add_action( 'genesis_footer_output', 'filter_genesis_footer_output' );
function filter_genesis_footer_output() {
// Build the text strings. Includes shortcodes.
$backtotop_text = '[footer_backtotop]';
$creds_text = sprintf( '[footer_copyright before="%s "] &#x000B7; [footer_childtheme_link before="" after=" %s"] [footer_genesis_link url="https://www.studiopress.com/" before=""] &#x000B7; [footer_wordpress_link] &#x000B7; [footer_loginout]', __( 'Copyright', 'genesis' ), __( 'on', 'genesis' ) );
// Filter the text strings.
$backtotop_text = apply_filters( 'genesis_footer_backtotop_text', $backtotop_text );
$creds_text = apply_filters( 'genesis_footer_creds_text', $creds_text );
View functions.php
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'sp_custom_footer' );
function sp_custom_footer() {
?>
<p>&copy; Copyright 2012 <a href="http://mydomain.com/">My Domain</a> &middot; All Rights Reserved &middot; Powered by <a href="http://wordpress.org/">WordPress</a> &middot; <a href="http://mydomain.com/wp-admin">Admin</a></p>
<?php
}
@braddalton
braddalton / functions.php
Created Nov 27, 2019
Custom Read More Text For Genesis Featured Posts Widget https://wp.me/p1lTu0-iKD
View functions.php
add_action( 'widgets_init', 'custom_readmore_featured_post_widget', 99 );
function custom_readmore_featured_post_widget() {
unregister_widget( 'Genesis_Featured_Post' );
}
@braddalton
braddalton / front-page.php
Created Nov 27, 2019
Wellness Pro Front Page As Page Template https://wp.me/p1lTu0-iKL
View front-page.php
add_action( 'genesis_meta', 'wellness_front_page_genesis_meta' );
function wellness_front_page_genesis_meta() {
// Enqueue scripts.
add_action( 'wp_enqueue_scripts', 'wellness_enqueue_front_script_styles' );
// Add front-page body class.
add_filter( 'body_class', 'wellness_body_class' );
You can’t perform that action at this time.