Esempio n. 1
0
    		<div id="jacbt_site_header_logo"></div>
    	</a>
	<?php 
}
?>
	<div class="jacbt_title_block">
    	<h1 class="jacbt_header_title"><?php 
if (get_theme_mod('jacbt_display_blogname', True)) {
    echo get_bloginfo('name');
}
?>
</h1>
    	<h3 class="jacbt_header_tagline"><?php 
if (get_theme_mod('jacbt_display_tagline', True)) {
    if (get_theme_mod('jacbt_dynamic_tagline', True) && is_single()) {
        echo jacbt_truncate_string(single_post_title('', FALSE), 60);
    } else {
        echo get_bloginfo('description');
    }
}
?>
</h3>
	</div>
    <?php 
get_header();
if (has_nav_menu('jacbt_menu_header')) {
    wp_nav_menu(array('theme_location' => 'jacbt_menu_header', 'container_class' => 'jacbt_menu_header'));
}
?>
	<span class="breaker-breaker"></span>
</div>
Esempio n. 2
0
function jacbt_render_posts()
{
    $pag_post_settings = array('before' => '<div class="jacbt_post_pag_header">' . __('Turn the page: ', 'bicicletta'), 'after' => '</div>', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' | ', 'pagelink' => '%', 'echo' => 1);
    if (have_posts()) {
        ?>
<div class="jacbt_post_nav jacbt_post_nav_top">
<div class="jacbt_post_nav_bottom_prev"><?php 
        next_posts_link('&larr; ' . __(' Older posts', 'bicicletta'));
        ?>
</div>
<div class="jacbt_post_nav_bottom_next"><?php 
        previous_posts_link(__('Newer posts ', 'bicicletta') . '&rarr;');
        ?>
</div>
</div>
  <?php 
        while (have_posts()) {
            the_post();
            ?>
<div <?php 
            post_class();
            ?>
>
<h1 class="jacbt_post_title"><?php 
            if (is_single()) {
                the_title();
            } else {
                ?>
<a class="jacbt_post_title_link"
	href="<?php 
                echo get_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a><?php 
            }
            ?>
</h1>
<div class="jacbt_meta_wrapper"><span
  class="jacbt_author_credit jacbt_post_meta jacbt_post_meta_left">Posted
by <a class="jacbt_author_credit jacbt_post_meta"
	href="<?php 
            get_author_posts_url(get_the_author_meta('display_name'));
            ?>
"><?php 
            echo get_the_author();
            ?>
</a></span>
<span class="jacbt_author_credit jacbt_post_meta jacbt_post_meta_right">Published
<?php 
            the_time('F jS, Y');
            ?>
</span>
<div class="breaker-breaker"></div>
<span class="jacbt_post_catlist jacbt_post_meta jacbt_post_meta_left"><?php 
            if (has_category()) {
                echo __('Posted in ', 'bicicletta') . get_the_category_list(', ', '');
            }
            ?>
</span>
<span class="jacbt_edit_post jacbt_post_meta jacbt_post_meta_right"><?php 
            edit_post_link(__('Edit', 'bicicletta'));
            ?>
</span>
</div>
<p><?php 
            wp_link_pages($pag_post_settings);
            ?>
 <?php 
            the_content(__('Continue Reading &rarr;', 'bicicletta'));
            ?>
<div class="jacbt_post_meta jacbt_post_tags jacbt_meta_wrapper"><?php 
            echo get_the_tag_list(__('Tagged: ', 'bicicletta'), ', ', '.');
            ?>
</div>
<?php 
            if (is_single()) {
                $previous_link = '';
                $next_link = '';
                $seek_post = get_previous_post();
                if (is_a($seek_post, 'WP_Post')) {
                    $link_title = '&larr; ' . __('Previous: ', 'bicicletta') . jacbt_truncate_string(get_the_title($seek_post->ID), 40);
                    $link_href = get_post_permalink($seek_post->ID);
                    $previous_link = '<a class="jacbt_nav_link jacbt_nav_link_previous" href="' . $link_href . '">' . $link_title . '</a>';
                }
                $seek_post = get_next_post();
                if (is_a($seek_post, 'WP_Post')) {
                    $link_title = __('Next: ', 'bicicletta') . jacbt_truncate_string(get_the_title($seek_post->ID), 40) . ' &rarr;';
                    $link_href = get_post_permalink($seek_post->ID);
                    $next_link = '<a class="jacbt_nav_link jacbt_nav_link_next" href="' . $link_href . '">' . $link_title . '</a>';
                }
                wp_link_pages($pag_post_settings);
                ?>

<div class="jacbt_comment_wrapper"><?php 
                comments_template();
                ?>
</div>
<div class="jacbt_post_nav_bottom">
<div class="jacbt_post_nav_bottom_prev"><?php 
                echo $previous_link;
                ?>
</div>
<div class="jacbt_post_nav_bottom_next"><?php 
                echo $next_link;
                ?>
</div>
</div>

</div>
<!--  post -->
  <?php 
            } else {
            }
            if (!is_single() && !is_sticky()) {
                echo '<hr class="jacbt_post_divider"> ';
            }
            ?>
</div>
</p>
<?php 
        }
        ?>
<div class="jacbt_post_nav jacbt_post_nav_bottom">
<div class="jacbt_post_nav_bottom_prev"><?php 
        next_posts_link('&larr; ' . __(' Older posts', 'bicicletta'));
        ?>
</div>
<div class="jacbt_post_nav_bottom_next"><?php 
        previous_posts_link(__('Newer posts ', 'bicicletta') . '&rarr;');
        ?>
</div>
</div>
<?php 
    } else {
        ?>
<p><?php 
        __('Sorry, no posts matched your criteria.', 'bicicletta');
        ?>
</p>
<?php 
    }
}