Skip to content

Instantly share code, notes, and snippets.

View wbxpress's full-sized avatar

WBXPress Team wbxpress

View GitHub Profile
@wbxpress
wbxpress / style.css
Created August 11, 2015 11:14
wbxpress-one theme's style file.
/*
Theme Name: WBXPress One
Theme URI: http://wbxpress.net/themes/
Author: WBXPress
Author URI: http://wbxpress.net/
Description: It is a very clean and simple theme for Your WordPress site.
Version: 1.0.0
License: GPL
License URI: http://www.gnu.org/licenses/gpl.html
Tags: blue, white, light, fluid-layout, responsive-layout, two-columns, right-sidebar, custom-menu, sticky-post, threaded-comments
//* Register Home Page Sidebar widget area
genesis_register_sidebar( array(
'id' => 'home-page-sidebar',
'name' => __( 'Home Page Sidebar', 'genesis-theme' ),
'description' => __( 'This is a widget area at sidebar only shown in home page', 'genesis-theme' ),
) );
//* Add widget area in sidebar for Home Page Only
//* Register Single Post Sidebar widget area
genesis_register_sidebar( array(
'id' => 'single-post-sidebar',
'name' => __( 'Single Post Sidebar', 'genesis-theme' ),
'description' => __( 'This is a widget area at sidebar only shown in single post', 'genesis-theme' ),
) );
//* Add widget area in sidebar for single post content
<?php
/*
Template Name: Untagged
*/
query_posts('orderby=title&order=asc&showposts=-1');
if (have_posts()) :
while (have_posts()) : the_post();
$tag = get_the_tags();
if (!$tag) { ?>
<?php
/**
* This file adds the Home Page to the WBXPress Theme.
*
* @author WBXPress
* @package WBXPress
* @subpackage Customizations
*/
add_action( 'genesis_meta', 'wbxpress_home_genesis_meta' );
/*
Home Widgets
---------------------------------------------------------------------------------------------------- */
.home-top-1 {
border-bottom: 1px solid #e5e5e5;
background-color: #fff;
}
.home-top-1 .widget {
.home-top-1 .widget {
float: left;
width: 47%;
}
.home-top-2 .widget {
float: left;
width: 47%;
}
//* 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' ),
/** 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);
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'pre-footer',
'name' => __( 'Before Footer Widgets', 'theme' ),
'description' => __( 'This is a Pre-Footer Widget area.', 'theme' ),
) );
add_action('genesis_before_footer', 'pre_footer_widget', 2 );
function pre_footer_widget() {