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
// Customizer with basic controls sample | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'description' => '', | |
'priority' => 120, | |
)); | |
// ============================= |
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 mytheme_customize_register( $wp_customize ) { | |
//All our sections, settings, and controls will be added here | |
} | |
add_action( 'customize_register', 'mytheme_customize_register' ); |
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(has_post_thumbnail()) : ?> | |
<?php the_post_thumbnail(); ?> | |
<?php 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
// Widget Locations | |
function fc_init_widgets($id){ | |
register_sidebar(array( | |
'name' => 'Sidebar', | |
'id' => 'sidebar', | |
'before_widget' => '<div class="sidebar-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); |
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
<!-- Get Archive Title --> | |
<?php if(is_category()) { | |
single_cat_title(); | |
} else if (is_author()) { | |
the_post(); | |
echo 'Archives By Author: ' .get_the_author(); | |
rewind_posts(); | |
} else if (is_tag()) { | |
single_tag_title(); |
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 // Get the list of categories to which the article belongs | |
$categories = get_the_category(); | |
$separator = ", "; | |
$output = ''; | |
if($categories) { | |
foreach($categories as $category) { | |
$output .= '<a href="'. | |
get_category_link($category->term_id).'">'. |
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 the_time('F j, Y g:i 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
<?php | |
$i = 0; // Counter | |
?> | |
<?php $featured_query = new WP_query(array( | |
'category_name' => 'featured' )); ?> | |
<?php while ($featured_query->have_posts()) : | |
$featured_query->the_post(); ?> |
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 // Get all posts except Featured | |
$no_featured_query = new WP_Query(array( | |
'cat' => '-3', | |
)); ?> | |
<?php while($no_featured_query->have_posts()) : ?> | |
<?php $no_featured_query->the_post(); ?> | |
<!-- HTML here--> |
NewerOlder