This file contains hidden or 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 | |
/** | |
* Page Banner Template. | |
*/ | |
global $post; | |
$page_header_hide_option = ''; | |
if( is_front_page() ) : | |
$page_header_hide_option = true; | |
else : | |
if(is_404()){ |
This file contains hidden or 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 loanplus_get_excerpt($limit, $source = null){ | |
if($source == "content" ? ($excerpt = get_the_content()) : ($excerpt = get_the_excerpt())); | |
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt); | |
$excerpt = strip_shortcodes($excerpt); | |
$excerpt = strip_tags($excerpt); | |
$excerpt = substr($excerpt, 0, $limit); | |
$excerpt = substr($excerpt, 0, strripos($excerpt, " ")); | |
$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt)); | |
return $excerpt; |
This file contains hidden or 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
Copy this file and include it in your theme inc folder then call it by funciton.php | |
<?php | |
/** | |
* Adds nextbuild_latest_post_widget. | |
*/ | |
class nextbuild_Latest_Post_Widget extends WP_Widget | |
{ |
This file contains hidden or 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
<div class="sidebar-searchbox"> | |
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get"> | |
<input type="text" name="s" placeholder="Search..."> | |
<button type="submit"><i class="fa fa-search"></i></button> | |
</form> | |
</div> |
This file contains hidden or 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
if (! function_exists('loanplus_time')) { | |
function loanplus_time() | |
{ | |
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; | |
if (get_the_time('U') !== get_the_modified_time('U')) { | |
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; | |
} | |
$time_string = sprintf( | |
$time_string, |
This file contains hidden or 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
<!-- Use this code instead including every file global $opt_name | |
You just copy this code and past it in your theme function.php and then change your options global veriable. | |
--> | |
if (! function_exists('redux_options')) { | |
function redux_options($id, $fallback = false, $key = false) | |
{ |
This file contains hidden or 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 | |
/** | |
* Plugin installation and activation for WordPress themes. | |
* | |
* Please note that this is a drop-in library for a theme or plugin. | |
* The authors of this library (Thomas, Gary and Juliette) are NOT responsible | |
* for the support of your plugin or theme. Please contact the plugin | |
* or theme author for support. | |
* | |
* @package TGM-Plugin-Activation |
This file contains hidden or 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 | |
add_filter('comment_form_default_fields', 'industryall_comment_form'); | |
function industryall_comment_form($industryall_fields) | |
{ | |
$industryall_fields['author'] = '<div class="col-sm-4"> | |
<div class="form-group"> | |
<label for="name-cmt">'.esc_html__('Name', 'industryall').' <span>*</span></label> |
This file contains hidden or 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 pagination with bootstrap .pagination class | |
* source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/ | |
*/ | |
function david_post_pagination($echo = true) | |
{ | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer |
NewerOlder