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 dynamic_add_linking($atts, $content=null){ | |
extract(shortcode_atts(array( | |
'link' => '', | |
'img' => '', | |
'title' => '', | |
), $atts, 'ads') ); | |
return '<a href=""><img src="'.$img.'" alt="" /></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
function category_post_shortcode($atts){ | |
extract( shortcode_atts( array( | |
'title' => '', | |
'link' => '', | |
'category' => '', | |
), $atts, 'category_post' ) ); | |
global $post; | |
$q = new WP_Query( |
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
/*This code for sidebar widget register*/ | |
function widget_areas() { | |
register_sidebar( array( | |
'name' => 'Left Menu', | |
'id' => 'left_sidebar', | |
'before_widget' => '<div class="single_sidebar">', | |
'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
add_action( 'init', 'create_post_type' ); | |
function create_post_type() { | |
register_post_type( 'testimonial', | |
array( | |
'labels' => array( | |
'name' => __( 'Testimonial' ), | |
'singular_name' => __( 'Testimonial' ), | |
'add_new' => __( 'Add New' ), | |
'add_new_item' => __( 'Add New Testimonial' ), | |
'edit_item' => __( 'Edit Testimonial' ), |
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 ( function_exists( 'get_option_tree') ) : if( get_option_tree( 'your_tree_id') ) : ?> | |
<a href="<?php bloginfo('home'); ?>"><img src="<?php get_option_tree( 'your_tree_id', '', 'true' ); ?>" alt=""/></a> | |
<?php else : ?> | |
<a href="<?php bloginfo('home'); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/logo.jpg" alt=""/></a> | |
<?php endif; endif; ?> |
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
<h2> | |
<?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?> | |
</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
<form role="search" method="get" id="searchform" class="searchform" action="http://localhost/corlate/"> | |
<div> | |
<label class="screen-reader-text" for="s">Search for:</label> | |
<input type="text" value="Feature shortcode" name="s" id="s"> | |
<input type="submit" id="searchsubmit" value="Search"> | |
</div> | |
</form> |
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
/** | |
* Required: set 'ot_theme_mode' filter to true. | |
*/ | |
add_filter( 'ot_theme_mode', '__return_true' ); | |
/** | |
* Required: include OptionTree. | |
*/ | |
require( trailingslashit( get_template_directory() ) . 'option-tree/ot-loader.php' ); |
OlderNewer