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 search($array, $key, $value) | |
{ | |
$results = array(); | |
if (is_array($array)) | |
{ | |
if (isset($array[$key]) && $array[$key] == $value) | |
$results[] = $array; | |
foreach ($array as $subarray) |
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
remove_filter('the_content', 'wpautop'); |
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
$i=1; | |
echo '<div id="slider" class="nivoSlider">'; | |
$args = array( 'post_type' => 'slide', 'posts_per_page' => 10 , 'orderby' => 'title' , 'order' => 'ASC' ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
echo '<a href="'.get_post_meta($post->ID, 'slide_info_slide_url', true).'"><img src="'.get_post_meta($post->ID, 'slide_info_slide_image', true).'" alt="'.get_post_meta($post->ID, 'slide_info_slide_title', true).'" title="#caption'.$i.'" /></a>'; | |
$i++; | |
endwhile; |
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
register_nav_menu( 'primary', __( 'Primary Menu', 'daily' ) ); | |
<?php wp_nav_menu( array( 'theme_location' => 'primary','menu_class' => 'dropdown dropdown-horizontal', 'container' => '' ) ); ?> |
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
/*============= Dropdown ============*/ | |
ul.dropdown ul li, | |
ul.dropdown-vertical { | |
} | |
ul.dropdown ul, | |
ul.dropdown li:hover ul ul, | |
ul.dropdown li:hover ul ul ul, | |
ul.dropdown li:hover ul ul ul ul, |
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
sudo /etc/init.d/apache2 restart | |
/sbin/service httpd restart |
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
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
FB.Canvas.setSize({ width: 810 ,height: 780 }); | |
</script> |
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
.hMenu | |
{ | |
text-align:justify; | |
width:800px; | |
margin:0 auto; | |
} | |
.filler | |
{ | |
width:100%; |
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 my_custom_post_product() { | |
$labels = array( | |
'name' => _x( 'Products', 'post type general name' ), | |
'singular_name' => _x( 'Product', 'post type singular name' ), | |
'add_new' => _x( 'Add New', 'book' ), | |
'add_new_item' => __( 'Add New Product' ), | |
'edit_item' => __( 'Edit Product' ), | |
'new_item' => __( 'New Product' ), | |
'all_items' => __( 'All Products' ), | |
'view_item' => __( 'View Product' ), |
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
//timing and profiling helpers | |
Profiler::tick('ce sa logheze', callback); | |
Log::write($type,$output); | |
$type = 'info'; | |
//get url | |
URI::segment(2) | |
//define contants |
OlderNewer