Beispiel #1
0
/**
 * The title secion.
 * Includes a <head> element and link.
 */
function stachestack_title_section($header = true, $element = 'h1', $link = false, $class = 'entry-title')
{
    $content = $header ? '<header>' : '';
    $content .= '<title>' . get_the_title() . '</title>';
    $content .= '<' . $element . ' class="' . $class . '">';
    $content .= $link ? '<a href="' . get_permalink() . '">' : '';
    $content .= is_singular() ? stachestack_title() : apply_filters('stachestack_title', get_the_title());
    $content .= $link ? '</a>' : '';
    $content .= '</' . $element . '>';
    $content .= $header ? '</header>' : '';
    echo apply_filters('stachestack_title_section', $content);
}
Beispiel #2
0
<header>
	<title><?php 
echo stachestack_title();
?>
</title>
	<h1 class="entry-title"><?php 
echo stachestack_title();
?>
</h1>
</header>

<?php 
do_action('stachestack_index_begin');
if (!have_posts()) {
    echo '<div class="alert alert-warning">' . __('Sorry, no results were found.', 'stachestack') . '</div>';
    get_search_form();
}
if (!has_action('stachestack_override_index_loop')) {
    while (have_posts()) {
        the_post();
        do_action('stachestack_in_loop_start');
        if (!has_action('stachestack_content_override')) {
            ss_get_template_part('templates/content', get_post_format());
        } else {
            do_action('stachestack_content_override');
        }
        do_action('stachestack_in_loop_end');
    }
} else {
    do_action('stachestack_override_index_loop');
}