This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add to functions.php | |
if (function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => 'Right header', | |
'id' => 'custom-widget-01', | |
'description' => 'Widget Area', | |
'before_widget' => '<div id="one" class="two">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-------------------------------------------------------------------------skills for portfolio custom post type -*/ | |
register_taxonomy("Skills", array("portfolio"), array("hierarchical" => true, "label" => "Skills", "singular_label" => "Skill", "rewrite" => true)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DisplayCategoriesWidget extends WP_Widget | |
{ | |
function DisplayCategoriesWidget() | |
{ | |
$widget_ops = array('classname' => 'DisplayCategoriesWidget', 'description' => 'Displays categories' ); | |
$this->WP_Widget('DisplayCategoriesWidget', 'Display Categories Widget', $widget_ops); | |
} | |
function form($instance) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disable_autop() { | |
global $post; | |
$disable_autop_var = get_post_meta($post->ID, 'disable_autop', TRUE); | |
if ( !empty( $disable_autop_var ) ) { | |
remove_filter('the_content', 'wpautop'); | |
} | |
} | |
add_action ('loop_start', 'disable_autop'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( has_post_thumbnail()) { | |
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); | |
echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >'; | |
the_post_thumbnail('new-size'); | |
echo '</a>'; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// custom image size for slider | |
if ( function_exists( 'add_image_size' ) ) { | |
add_image_size( 'new-size', 900, 400, true ); //(add new size here) | |
} | |
add_filter('image_size_names_choose', 'my_image_sizes'); | |
function my_image_sizes($sizes) { | |
$addsizes = array( | |
"new-size" => __( "New Size") |