Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Raiber committed May 11, 2018
1 parent 58fc96a commit 8afc865
Show file tree
Hide file tree
Showing 35 changed files with 1,525 additions and 1,094 deletions.
16 changes: 9 additions & 7 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@
<h2 class="widgettitle"><?php esc_html_e( 'Most Used Categories', 'sparkling' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
) );
wp_list_categories(
array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
)
);
?>
</ul>
</div><!-- .widget -->
Expand Down
19 changes: 12 additions & 7 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<main id="main" class="site-main" role="main">

<?php
if ( have_posts() ) : ?>
if ( have_posts() ) :
?>

<header class="page-header">
<?php
Expand All @@ -24,7 +25,8 @@

<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();

/*
* Include the Post-Format-specific template for the content.
Expand All @@ -35,16 +37,19 @@

endwhile;

the_posts_pagination( array(
'prev_text' => '<i class="fa fa-chevron-left"></i> ' . __( 'Newer posts', 'sparkling' ),
'next_text' => __( 'Older posts', 'sparkling' ) . ' <i class="fa fa-chevron-right"></i>',
) );
the_posts_pagination(
array(
'prev_text' => '<i class="fa fa-chevron-left"></i> ' . __( 'Newer posts', 'sparkling' ),
'next_text' => __( 'Older posts', 'sparkling' ) . ' <i class="fa fa-chevron-right"></i>',
)
);

else :

get_template_part( 'template-parts/content', 'none' );

endif; ?>
endif;
?>

</main><!-- #main -->
</div><!-- #primary -->
Expand Down
18 changes: 11 additions & 7 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

<?php
// You can start editing here -- including this comment!
if ( have_comments() ) : ?>
if ( have_comments() ) :
?>
<h2 class="comments-title">
<?php
$comments_number = get_comments_number();
Expand Down Expand Up @@ -60,11 +61,13 @@

<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 60,
) );
wp_list_comments(
array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 60,
)
);
?>
</ol><!-- .comment-list -->

Expand All @@ -85,7 +88,8 @@


// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>

<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'sparkling' ); ?></p>
<?php
Expand Down
5 changes: 4 additions & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info container">
<div class="row">
<?php if ( of_get_option( 'footer_social' ) ) { sparkling_social_icons();} ?>
<?php
if ( of_get_option( 'footer_social' ) ) {
sparkling_social_icons();}
?>
<nav role="navigation" class="col-md-6">
<?php sparkling_footer_links(); ?>
</nav>
Expand Down
203 changes: 113 additions & 90 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,36 @@ function sparkling_setup() {
add_image_size( 'tab-small', 60, 60, true ); // Small Thumbnail

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'sparkling' ),
'footer-links' => esc_html__( 'Footer Links', 'sparkling' ),// secondary nav in footer
) );
register_nav_menus(
array(
'primary' => esc_html__( 'Primary Menu', 'sparkling' ),
'footer-links' => esc_html__( 'Footer Links', 'sparkling' ), // secondary nav in footer
)
);

// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );

// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'sparkling_custom_background_args', array(
'default-color' => 'F2F2F2',
'default-image' => '',
) ) );
add_theme_support(
'custom-background', apply_filters(
'sparkling_custom_background_args', array(
'default-color' => 'F2F2F2',
'default-image' => '',
)
)
);

// Enable support for HTML5 markup.
add_theme_support( 'html5', array(
'comment-list',
'search-form',
'comment-form',
'gallery',
'caption',
) );
add_theme_support(
'html5', array(
'comment-list',
'search-form',
'comment-form',
'gallery',
'caption',
)
);

/*
* Let WordPress manage the document title.
Expand Down Expand Up @@ -126,74 +134,88 @@ function sparkling_setup() {
* Register widgetized area and update sidebar with default widgets.
*/
function sparkling_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'sparkling' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'home-widget-1',
'name' => esc_html__( 'Homepage Widget 1', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'home-widget-2',
'name' => esc_html__( 'Homepage Widget 2', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'home-widget-3',
'name' => esc_html__( 'Homepage Widget 3', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'footer-widget-1',
'name' => esc_html__( 'Footer Widget 1', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'footer-widget-2',
'name' => esc_html__( 'Footer Widget 2', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );

register_sidebar( array(
'id' => 'footer-widget-3',
'name' => esc_html__( 'Footer Widget 3', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
) );
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'sparkling' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'home-widget-1',
'name' => esc_html__( 'Homepage Widget 1', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'home-widget-2',
'name' => esc_html__( 'Homepage Widget 2', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'home-widget-3',
'name' => esc_html__( 'Homepage Widget 3', 'sparkling' ),
'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'footer-widget-1',
'name' => esc_html__( 'Footer Widget 1', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'footer-widget-2',
'name' => esc_html__( 'Footer Widget 2', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_sidebar(
array(
'id' => 'footer-widget-3',
'name' => esc_html__( 'Footer Widget 3', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
)
);

register_widget( 'Sparkling_Social_Widget' );
register_widget( 'Sparkling_Popular_Posts' );
Expand All @@ -205,7 +227,7 @@ function sparkling_widgets_init() {


/* --------------------------------------------------------------
Theme Widgets
Theme Widgets
-------------------------------------------------------------- */
require_once( get_template_directory() . '/inc/widgets/class-sparkling-categories.php' );
require_once( get_template_directory() . '/inc/widgets/class-sparkling-popular-posts.php' );
Expand Down Expand Up @@ -240,7 +262,6 @@ function sparkling_scripts() {
wp_register_style( 'sparkling-fonts', '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700|Roboto+Slab:400,300,700' );
}


wp_enqueue_style( 'sparkling-fonts' );

// Add slider CSS only if is front page ans slider is enabled
Expand All @@ -258,10 +279,12 @@ function sparkling_scripts() {
// Add slider JS only if is front page ans slider is enabled
wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/assets/js/vendor/flexslider.min.js', array( 'jquery' ), '20140222', true );
// Flexslider customization
wp_enqueue_script( 'flexslider-customization', get_template_directory_uri() . '/assets/js/flexslider-custom.js', array(
'jquery',
'flexslider-js'
), '20140716', true );
wp_enqueue_script(
'flexslider-customization', get_template_directory_uri() . '/assets/js/flexslider-custom.js', array(
'jquery',
'flexslider-js',
), '20140716', true
);
}

// Main theme related functions
Expand Down Expand Up @@ -522,4 +545,4 @@ function sparkling_get_attachment_image() {
new Epsilon_Framework( $epsilon_framework_settings );

//Include Welcome Screen
require get_template_directory() . '/inc/welcome-screen/welcome-page-setup.php';
require get_template_directory() . '/inc/welcome-screen/welcome-page-setup.php';
Loading

0 comments on commit 8afc865

Please sign in to comment.