Skip to content

Instantly share code, notes, and snippets.

WBXPress Team wbxpress

Block or report user

Report or block wbxpress

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 categories.php
// Add Shortcode for category page
function list_categories($atts, $content = null) {
$atts = shortcode_atts(
array(
'show_option_all' => '',
'orderby' => 'name',
'order' => 'ASC',
'style' => 'list',
'show_count' => 0,
'hide_empty' => 1,
View style.css
/* Front Page Widgets
--------------------------------------------- */
.front-page-1 .widget {
float: left;
width: 50%;
}
.front-page-2 .widget {
float: left;
width: 50%;
View style.css
/* Front Page with Full-Width Sections
-------------------------------------------- */
.site-inner.full {
max-width: none;
padding: 0;
}
.site-inner.full .wrap {
max-width: 800px;
View front-page.php
<?php
/**
* Homepage Template.
*/
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
/**
* Adds attributes from 'entry', since this replaces the main entry.
*
* @author Bill Erickson
View functions.php
// Registers front-page widget areas.
for ( $i = 1; $i <= 4; $i++ ) {
genesis_register_widget_area(
array(
'id' => "front-page-{$i}",
'name' => __( "Front Page {$i}", 'genesis-sample' ),
'description' => __( "This is the front page {$i} section.", 'genesis-sample' ),
)
);
}
View post-modified-date.php
add_filter( 'genesis_post_info', 'wbxp_post_info_filter' );
function wbxp_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = 'Updated: [post_modified_date] by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}}
View extra-profile.php
add_action( 'show_user_profile', 'wbxp_profile_fields' );
add_action( 'edit_user_profile', 'wbxp_profile_fields' );
function wbxp_profile_fields( $user ) {
?>
<h3>Social Sites</h3>
<table class="form-table">
View defer-jquery.php
/** Remove jQuery scripts from begining */
add_action('wp_enqueue_scripts', 'wbxp_script_remove_header');
function wbxp_script_remove_header() {
wp_deregister_script( 'jquery' );
}
/** Load jQuery script at the end */
add_action('genesis_after_footer', 'wbxp_script_add_body');
function wbxp_script_add_body() {
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, null);
View functions.php
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-top-1',
'name' => __( 'Home - Top 1', 'wbxpress' ),
'description' => __( 'This is the top section of the Home page.', 'wbxpress' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top-2',
'name' => __( 'Home - Top 2', 'wbxpress' ),
View style-mobile.css
.home-top-1 .widget {
float: left;
width: 47%;
}
.home-top-2 .widget {
float: left;
width: 47%;
}
You can’t perform that action at this time.