Skip to content

Instantly share code, notes, and snippets.

View wbxpress's full-sized avatar

WBXPress Team wbxpress

View GitHub Profile
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;
}}
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">
/** 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' => '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' ),
.home-top-1 .widget {
float: left;
width: 47%;
}
.home-top-2 .widget {
float: left;
width: 47%;
}
/*
Home Widgets
---------------------------------------------------------------------------------------------------- */
.home-top-1 {
border-bottom: 1px solid #e5e5e5;
background-color: #fff;
}
.home-top-1 .widget {
<?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' );
//* 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() {
@wbxpress
wbxpress / open-graph-meta.php
Created October 1, 2015 07:46
Adds Open Graph Meta into Wordpress
function doctype_opengraph($output) {
return $output . '
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml"';
}
add_filter('language_attributes', 'doctype_opengraph');
function fb_opengraph() {
global $post;
<?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) { ?>