Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
)
);

jf_get_main_template_part(
jf_get_main_template_part_single(
array(
'templates/content/404',
)
Expand Down
6 changes: 3 additions & 3 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
)
);

jf_get_main_template_part(
jf_get_main_template_part_archive(
array(
'templates/content/archive',
'templates/snippets/pager'
)
);

jf_get_sidebar_template_part(
jf_get_sidebar_template_part(
array(

)
);
);
14 changes: 11 additions & 3 deletions functions/jf-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,22 @@ function jf_get_main_header_template_part( $templates ) {
}
}

function jf_get_main_template_part( $templates ){
function jf_get_main_template_part_single( $templates ){
print '<article class="content">';
foreach ( $templates as $template ) {
get_template_part( $template );
}
print '</article>';
}

function jf_get_main_template_part_archive( $templates ){
print '<section class="content">';
foreach ( $templates as $template ) {
get_template_part( $template );
}
print '</section>';
}

function jf_get_sidebar_template_part( $templates ){
if( !empty($templates) ) {
print '<aside class="sidebar">';
Expand All @@ -72,7 +80,7 @@ function jf_get_sidebar_template_part( $templates ){

// Enqueue all Stylesheets and Javascript files
function jf_enqueue_scripts_styles() {
if( ENVIRONMENT == 'prod' ) {
if( ENVIRONMENT == 'prod' ) {
wp_enqueue_style( 'style-min', get_template_directory_uri() .'/assets/css/style.min.css', false );
} else {
wp_enqueue_style( 'style', get_template_directory_uri() .'/assets/css/style.css', false );
Expand Down Expand Up @@ -142,4 +150,4 @@ function rm_generator_filter() {


// Load translation files || Read more about this in /lang/readme.txt
load_theme_textdomain('jumpingfrog', get_template_directory() .'/lang' );
load_theme_textdomain('jumpingfrog', get_template_directory() .'/lang' );
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
)
);

jf_get_main_template_part(
jf_get_main_template_part_single(
array(
'templates/content/page'
)
Expand Down
2 changes: 1 addition & 1 deletion page.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
)
);

jf_get_main_template_part(
jf_get_main_template_part_single(
array(
'templates/content/page'
)
Expand Down
8 changes: 4 additions & 4 deletions templates/content/archive.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
<?php
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class() ?>>
<article <?php post_class() ?>>
<?php jf_read_more_excerpt(); ?>
</div>
</article>
<?php
endwhile;
endif;
endif;
4 changes: 2 additions & 2 deletions templates/content/page.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
<?php
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class() ?>>
<div <?php post_class() ?>>
<?php the_content(); ?>
</div>
<?php
Expand Down