Skip to content

Instantly share code, notes, and snippets.

Sridhar Katakam srikat

Block or report user

Report or block srikat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
srikat / Media Queries
Created May 9, 2013
Taken from Skype.
View Media Queries
@media only screen and (min-width: 0px) and (max-width: 320px) {
/* Smartphones (portrait and landscape) ----------- */
srikat / functions.php
Created May 14, 2013
Adding a search box in nav bar in WooThemes Canvas
View functions.php
add_action( 'woo_nav_inside', 'woo_add_nav_search', 30 );
if ( ! function_exists( 'woo_add_nav_search' ) ) {
function woo_add_nav_search () { ?>
<div class="fr">
<?php get_search_form(); ?>
srikat / functions.php
Created May 15, 2013
Change URL of logo in Canvas from the default (site homepage) to a custom one. Code is to be added in child theme's functions.php.
View functions.php
// Remove logo code from Canvas
add_action('wp_head', 'remove_woo_logo');
function remove_woo_logo() {
srikat / 1. Step 1
Last active Jan 13, 2016
Mobile nav for custom menu in a HTML module in iThemes Builder
View 1. Step 1
Using BuilderChild-Air. Can be used in any child theme in conjunction with
Code in PHP enabled HTML module (2nd module from top in layout) where "All Pages" is the name of custom menu:
<a id="logo" href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/100x50.gif" alt="Home" /></a>
<?php wp_nav_menu( array( 'menu' => 'All Pages', 'menu_class' => 'builder-module-navigation') ); ?>
srikat / new_gist_file
Created Jul 27, 2013
To display YouTube video with player when the video URL has been entered in a custom field attached to a CPT in WordPress. Details:
View new_gist_file
[pb_vidembed title="" caption="" url='[types field="youtube-link" class="youtube-video" raw="true"][/types]' type="yt" w="270" h="217"]
srikat / functions.php
Created Aug 29, 2013
Adding date shortcodes before entry content for articles in Genesis using "genesis_before_entry_content" action.
View functions.php
add_action( 'genesis_before_entry_content','sri_add_date');
function sri_add_date () {
if (is_home() || is_archive()) { ?>
<div class="my-date">
<span class="my-date-day"><?php echo do_shortcode("[post_date format='j']"); ?></span>
<span class="my-date-month"><?php echo do_shortcode("[post_date format='M']"); ?></span>
<?php }
//* Customize the post info function
srikat / google-translator-in-nav.php
Created Aug 31, 2013
Add this in functions.php to insert a div that shows the output of Google Language Translator WordPress plugin. Details:
View google-translator-in-nav.php
//* Do NOT include the opening php tag
add_filter( 'genesis_nav_items', 'sk_google_translator', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sk_google_translator', 10, 2 );
function sk_google_translator($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] )
return $menu;
srikat / genesis-masonry.php
Last active Apr 9, 2019
Pinterest-like Masonry layout for Posts page and Archives in Genesis. Details:
View genesis-masonry.php
//* Do NOT include the opening php tag
// =================================================================
// = Pinterest-like Masonry layout for Posts page and Archives =
// =================================================================
//* Enqueue and initialize jQuery Masonry script
function sk_masonry_script() {
if (is_home() || is_archive()) {
srikat / style.css
Last active Dec 23, 2015
CSS for Pinterest-like Masonry layout in Genesis. Details:
View style.css
Pinterest-like Masonry layout for Posts page and Archives
.masonry-page .content .entry {
padding: 0;
border-radius: 0;
width: 255px;
overflow: hidden;
srikat / Blog Post with Date.html
Created Sep 26, 2013
Views plugins' Content Template code to display month and day for each post. Details:
View Blog Post with Date.html
<h4><a title="[wpv-post-title]" href="[wpv-post-url]">[wpv-post-title]</a></h4>
<em class="date">
<time datetime="[wpv-post-date format="c"]" itemprop="datePublished">
<span class="month">[wpv-post-date format="M"]</span>
<span class="day">[wpv-post-date format="j"]</span>
You can’t perform that action at this time.