Skip to content

Instantly share code, notes, and snippets.

View wbxpress's full-sized avatar

WBXPress Team wbxpress

View GitHub Profile
//* Add new widget area between posts of home page
genesis_register_sidebar( array(
'id' => 'between-posts-area',
'name' => __( 'Between Posts Area', 'genesis-theme' ),
'description' => __( 'This widget show between and after few posts.', 'genesis-theme' ),
) );
//* Add widget area between and after 2 posts
@wbxpress
wbxpress / header.php
Created August 11, 2015 11:05
wbxpress-one theme's header file.
<html>
<head>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="container">
<div id="header">
<h1 id="header-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<div id="header-description"><?php bloginfo( 'description' ); ?></div>
</div><!-- #header -->
@wbxpress
wbxpress / index.php
Created August 11, 2015 11:06
wbxpress-one theme's index file.
<?php get_header(); ?>
<?php if ( have_posts() ): ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php
the_posts_pagination( array(
'prev_text' => __( 'Previous', 'wbxpress-one' ),
'next_text' => __( 'Next', 'wbxpress-one' ),
'before_page_number' => '',
@wbxpress
wbxpress / sidebar.php
Created August 11, 2015 11:08
wbxpress-one theme's sidebar file.
</div><!-- #main-content -->
<div id="sidebar">
<?php if ( is_active_sidebar( 'sidebar' ) ) : ?>
<?php dynamic_sidebar( 'sidebar' ); ?>
<?php endif; ?>
</div><!-- #sidebar -->
@wbxpress
wbxpress / footer.php
Created August 11, 2015 11:08
wbxpress-one theme's footer file.
@wbxpress
wbxpress / content.php
Created August 11, 2015 11:09
wbxpress-one theme's content file.
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_single() || is_page() ) {
the_title( '<h2>', '</h2>' );
} else {
the_title( sprintf( '<h2><a href="%s">', esc_url( get_permalink() ) ), '</a></h2>' );
}
?>
<?php if ( ! is_page() ): ?>
<div class="post-meta">
@wbxpress
wbxpress / content-none.php
Created August 11, 2015 11:10
wbxpress-one theme's content-none file.
<div>
<h2><?php _e( 'Nothing Found', 'wbxpress-one' ); ?></h2>
<?php if ( is_search() ): ?>
<p><?php _e( 'Sorry, but nothing matched your search terms.', 'wbxpress-one' ); ?></p>
<?php else: ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for.', 'wbxpress-one' ); ?></p>
<?php endif; ?>
<?php get_search_form(); ?>
</div>
<div class="clear post-spt"></div>
@wbxpress
wbxpress / single.php
Created August 11, 2015 11:11
wbxpress-one theme's single file.
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php if ( comments_open() || get_comments_number() ) : ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
@wbxpress
wbxpress / comments.php
Created August 11, 2015 11:11
wbxpress-one theme's comments file.
<?php
if ( post_password_required() ) {
return;
}
function wbxpressone_comment_nav() {
// Are there comments to navigate through?
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
?>
@wbxpress
wbxpress / functions.php
Created August 11, 2015 11:12
wbxpress-one theme's functions file.
<?php
if ( ! isset( $content_width ) ) {
$content_width = 550;
}
if ( ! function_exists( 'wbxpressone_setup' ) ) {
function wbxpressone_setup() {
add_theme_support( 'title-tag' );