Skip to content

Instantly share code, notes, and snippets.

View vividvilla's full-sized avatar

Vivek R vividvilla

View GitHub Profile
<table>
<tbody>
<tr>
<th style="text-align: left;" colspan="2">Specs at a glance: Google/Motorola Moto X</th>
</tr>
<tr>
<th>Screen</th>
<td>1280×720 4.7-inch (313 PPI) RGB AMOLED</td>
</tr>
<tr>
@vividvilla
vividvilla / genericons-chat.html
Last active December 21, 2015 06:09
Genericons HTML code for chat
<div class="genericon genericon-chat"></div>
@vividvilla
vividvilla / gist:6199202
Last active December 20, 2015 21:39
Remove Dates from Posts in Particular Category : Genesis Framework
<?php
//* Do NOT include the opening php tag
//* Customize the entry meta in the entry header */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if( !in_category( array('cat-1','cat-2') )) {
$post_info = 'Posted by [post_author_posts_link] [post_comments] [post_edit]';
}
else {
@vividvilla
vividvilla / remove-date-from-category.php
Last active December 28, 2015 08:51
Remove Dates from Posts in Particular Category : Genesis Framework
<?php
//* Do NOT include the opening php tag
//* Customize the entry meta in the entry header */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if( in_category( array('cat-1','cat-2') )) {
$post_info = 'Posted by [post_author_posts_link] [post_comments] [post_edit]';
}
else {
@vividvilla
vividvilla / author-box-genesis-1.php
Last active December 18, 2015 17:49
Display Custom Auhtor Box with Social Media Links without Plugin – Genesis Framework
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
add_action( 'genesis_after_post', 'theme_author_box' );
function theme_author_box() {
$authinfo = "<div class=\"postauthor\">\r\n";
$authinfo .= get_avatar(get_the_author_id() , 100);
$authinfo .= "<h4>". get_the_author_meta('display_name') ."</h4>\r\n";
$authinfo .= "<p>" . get_the_author_meta('description') . "</p>\r\n";
$authinfo .= "</div>\r\n";
$facebook = get_the_author_meta('facebook');
@vividvilla
vividvilla / authorbox-genesis2.php
Last active December 18, 2015 17:49
Display Custom Auhtor Box with Social Media Links without Plugin - Genesis Framework
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8);
add_action('genesis_after_entry', 'theme_author_box', 8);
function theme_author_box() {
$authinfo = "<div class=\"postauthor\">\r\n";
$authinfo .= get_avatar(get_the_author_id() , 100);
$authinfo .= "<h4>". get_the_author_meta('display_name') ."</h4>\r\n";
$authinfo .= "<p>" . get_the_author_meta('description') . "</p>\r\n";
$authinfo .= "</div>\r\n";
$facebook = get_the_author_meta('facebook');
@vividvilla
vividvilla / page_landing.php
Last active December 18, 2015 00:19
Landing Page template - Genesis Child Theme ( http://www.wpstuffs.com/create-landing-page-genesis-child-theme )
<?php
/*
Template Name: Landing
*/
// Add custom body class to the head
add_filter( 'body_class', 'add_body_class' );
function add_body_class( $classes ) {
$classes[] = 'landing-page';
@vividvilla
vividvilla / gplus.php
Created April 21, 2013 18:13
Implement Google Plus Commenting to WordPress blog without using Plugin - Twenty eleven theme
<?php
/**
* The template for displaying Comments.
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to twentyeleven_comment() which is
* located in the functions.php file.
*
* @package WordPress
@vividvilla
vividvilla / gplus.html
Created April 21, 2013 18:11
Implement Google Plus Commenting to WordPress blog without using Plugin
<script src="https://apis.google.com/js/plusone.js">
</script>
<div class="g-comments"
data-href="<?php the_permalink(); ?>"
data-width="800"
data-first_party_property="BLOGGER"
data-view_type="FILTERED_POSTMOD">
</div>
@vividvilla
vividvilla / functions.php
Created March 14, 2013 07:32
How to add Newsletter Widget below the content in Genesis Child Themes
// Code to register a newsletter widget area
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );
// Add the newsletter widget after the post content