Skip to content

Instantly share code, notes, and snippets.

View wbxpress's full-sized avatar

WBXPress Team wbxpress

View GitHub Profile
/** Add meta for SEO **/
function wbxpress_add_meta_tags() {
// homepage
if (is_home()) {
echo '<meta name="description" content="' . get_bloginfo( "description" ) . '" />' . "\n";
}
// single post page
if ( is_singular() ) {
global $post;
$meta_description = strip_tags($post->post_excerpt);
function wbxp_member_check_shortcode( $atts, $content = null ) {
$infotext = 'Please <a href="/wp-login.php">Login</a> to <b>Download the PDF</b> file.';
if ( is_user_logged_in() && !is_feed() ) {
return wpautop(do_shortcode($content));
}
else {
return '<blockquote>' . html_entity_decode($infotext) . '</blockquote>';
}
}
add_shortcode('member', 'wbxp_member_check_shortcode');
function departmentlist() {
$categories = get_categories( array(
'orderby' => 'name',
'order' => 'ASC'
) );
echo '<br />';
foreach( $categories as $category ) {
$category_link = sprintf(
'<a href="%1$s">%2$s</a>',
esc_url( get_category_link( $category->term_id ) ),
// 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,
/* Front Page Widgets
--------------------------------------------- */
.front-page-1 .widget {
float: left;
width: 50%;
}
.front-page-2 .widget {
float: left;
width: 50%;
/* Front Page with Full-Width Sections
-------------------------------------------- */
.site-inner.full {
max-width: none;
padding: 0;
}
.site-inner.full .wrap {
max-width: 800px;
<?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
// 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' ),
)
);
}