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 | |
wp_list_authors( array( | |
'show_fullname' => 1, | |
'optioncount' => 1, | |
'orderby' => 'post_count', | |
'order' => 'DESC', | |
'number' => 3 | |
) ); |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
?> |
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
<form role="search" method="get" class="search-form" id="searchform" action="<?php echo home_url( '/' ); ?>"> | |
<div class="input-group"> | |
<input type="search" id="s" class="form-control search-field" | |
placeholder="<?php echo esc_attr_x( 'Search…', 'placeholder' ) ?>" | |
value="<?php echo get_search_query() ?>" name="s" | |
title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" /> | |
<div class="input-group-append"> | |
<span class="input-group-text"><button type="submit" class="search-button"><i class="fa fa-search"></i></button></span> | |
</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
<?php | |
if(isset($_POST['field-name'])){ | |
/* Do something */ | |
} |
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 | |
$newdate = DateTime::createFromFormat('d-m-Y', '16-04-2018')->format('Y-m-d'); | |
?> |
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 | |
$time = strtotime('16-04-2018'); | |
$converted_date = date('Y-m-d', $time); | |
echo $converted_date; | |
?> |
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 | |
//Do not copy the above php tag. | |
function ec_custom_post_navigation() | |
{ | |
?> | |
<div class="prev_next"> | |
<div class="nav_left"> | |
<span class="prev">Previous Post</span> <?php previous_post_link('%link', '%title'); ?> | |
</div class="nav_right"> |
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 | |
//Do not copy the above php tag. | |
define('WP_MEMORY_LIMIT', '256M'); |
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 | |
//Do not copy the above php tag. | |
define('WP_MEMORY_LIMIT', '256M'); |
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 | |
// Do not copy the above php tag. | |
global $post; | |
if( is_object( $post ) && 1780 == $post->ID ) { | |
/* ... */ | |
} |
NewerOlder