Skip to content

Instantly share code, notes, and snippets.

View cagriuckan's full-sized avatar
🏠
Working from home

Çağrı Üçkan cagriuckan

🏠
Working from home
View GitHub Profile
<?php get_header(); ?>
<!-- Sidebar -->
<?php get_sidebar(); ?>
<!-- End Sidebar -->
<?php get_footer(); ?>
<div class="sidebar-2">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar2') ) : endif; ?>
</div>
<div class="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar') ) : endif; ?>
</div>
if(function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<aside id="%1$s" class="widgets %2$s">',
'after_widget' => '</aside>',
'before_title' => '<div class="widget-title"><h2 class="title">',
'after_title' => '</h2></div>',
));
register_sidebar(array(
'name' => 'Sidebar2',
@cagriuckan
cagriuckan / search.php
Created August 10, 2016 15:59
Wordpress custom post tyle search.php
<?php
$post_type = $_GET['post_type'];
if ( isset( $post_type ) && locate_template( 'search-' . $post_type . '.php' ) ) {
get_template_part( 'search', $post_type );
exit;
}
?>
@cagriuckan
cagriuckan / post-type-searchform.php
Created August 10, 2016 15:50
Custom post type search form
<!-- uckan.net - WordpressCustom Post Tyle Search Form -->
<form class="search" action="<?php echo home_url( '/' ); ?>">
<input type="search" name="s" placeholder="Search&hellip;">
<input type="submit" value="Search">
<input type="hidden" name="post_type" value="post-type-ismi">
</form>
@cagriuckan
cagriuckan / searchform.php
Created August 10, 2016 15:47
Wordpress standart searchform.php
<!-- uckan.net - Standart Wordpress Search Form -->
<form class="search" action="<?php echo home_url( '/' ); ?>">
<input type="search" name="s" placeholder="Arama">
<input type="submit" value="Search">
</form>