Skip to content

Instantly share code, notes, and snippets.

@unix7
unix7 / style.css
Last active December 16, 2015 07:49
Example for hyperlink in sidebar for kujie2.com
#sidebar a {
color: #333;
}
#sidebar a:hover {
color: #d458a6
}
@unix7
unix7 / gist:4573422
Created January 19, 2013 16:17
URL Changes for Kujie2.com after deactivating the WP-HTML-Compression plugin
/*
* URL Changes for Kujie2.com after deactivating the WP-HTML-Compression plugin
*/
/** Before - Plugin: Activate */
<link rel="alternate" type="application/rss+xml" title="Hidup Biar Sedap &raquo; Feed" href="feed"/>
/** After - Plugin: Deactivate */
@unix7
unix7 / gist:4562258
Last active December 11, 2015 06:49
Feed Urls Comparison
/*
* Kujie2.com
* Result: Error
*/
<link rel="alternate" type="application/rss+xml" title="Hidup Biar Sedap &raquo; Feed" href="feed"/>
/*
* Puanbee.com
* Result: OK
@unix7
unix7 / gist:4510595
Last active March 21, 2018 14:57
Basic CSS For Formidable Form
/* Form */
.with_frm_style label{
font-size:12px;
float:none;
text-align:left;
margin:0;
padding:0;
width:auto;
}
@unix7
unix7 / gist:3886987
Created October 14, 2012 01:57
Advance Customization of Genesis Comment
// Source: http://genesissnippets.com/custom-comments-html-output-with-genesis-framework/
// First remove the genesis_default_list_comments function
remove_action( 'genesis_list_comments', 'genesis_default_list_comments' );
// Now add our own and specify our custom callback
add_action( 'genesis_list_comments', 'child_default_list_comments' );
function child_default_list_comments() {
$args = array(
@unix7
unix7 / gist:3707171
Created September 12, 2012 14:54
Add CPT to Feed
// Source: http://yoast.com/custom-post-type-snippets/
// Add a Custom Post Type to a feed
function add_cpt_to_feed( $qv ) {
if ( isset($qv['feed']) && !isset($qv['post_type']) )
$qv['post_type'] = array('post', '<CPT>');
return $qv;
}
add_filter( 'request', 'add_cpt_to_feed' );
@unix7
unix7 / gist:3707162
Created September 12, 2012 14:53
Exclude Certain Post Format from Blog Loop
//Source: http://www.billerickson.net/customize-the-wordpress-query/#example-category
<?php
/**
* Exclude Post Formats from Blog
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
@unix7
unix7 / gist:3260560
Created August 4, 2012 23:23
Shadow on Top of Image
/**
* Shadow on Top of Image
* @author: Affan Ruslan
* @link: Affanruslan.com
* Use shadow box for the primary (top) menu.
* Use inset shadow for the secondary (bottom) menu.
* Preview http://imgur.com/QTKNO
*/
@unix7
unix7 / 3-columns-home.php
Last active October 7, 2015 13:37
3 column homepage
<?php
/*
Template: Home
*/
//Add Post Class Filter
add_filter('post_class', 'sf_post_class');
function sf_post_class($classes) {
global $loop_counter;
$classes[] = 'one-third';
@unix7
unix7 / Responsive Image CSS
Created February 23, 2012 18:31
Responsive Image
//Source: http://jeffsebring.com/responsive-wordpress-images/
.entry-content img, .comment-content img, .widget img {
max-width: 97.5%;
}
img[class*="align"], img[class*="wp-image-"] {
height: auto;
}