Beispiel #1
0
function theme_404_content_cat($args = '')
{
    $args = wp_parse_args($args, array('error_title' => __('Pàgina no trobada', THEME_NS), 'error_message' => __('No s\'ha trobat la pàgina que busques. Vols provar a cercar alguna cosa ?', THEME_NS), 'focus_script' => '<script type="text/javascript">jQuery(\'div.mmb-content input[name="s"]\').focus();</script>'));
    extract($args);
    theme_post_wrapper(array('title' => $error_title, 'content' => '<p class="center">' . $error_message . '</p>' . "\n" . theme_get_search() . $focus_script));
    if (theme_get_option('theme_show_random_posts_on_404_page')) {
        theme_ob_start();
        echo '<h4 class="box-title">' . theme_get_option('theme_show_random_posts_title_on_404_page') . '</h4>';
        ?>
        <ul>
        <?php 
        global $post;
        $rand_posts = get_posts('numberposts=5&orderby=rand');
        foreach ($rand_posts as $post) {
            ?>
                <li><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></li>
        <?php 
        }
        ?>
        </ul>
        <?php 
        theme_post_wrapper(array('content' => theme_ob_get_clean()));
    }
    if (theme_get_option('theme_show_tags_on_404_page')) {
        theme_ob_start();
        echo '<h4 class="box-title">' . theme_get_option('theme_show_tags_title_on_404_page') . '</h4>';
        wp_tag_cloud('smallest=9&largest=22&unit=pt&number=200&format=flat&orderby=name&order=ASC');
        theme_post_wrapper(array('content' => theme_ob_get_clean()));
    }
}
Beispiel #2
0
    function theme_404_content()
    {
        $error_message = __('Apologies, but the page you requested could not be found. Perhaps searching will help.', THEME_NS);
        theme_post_wrapper(array('title' => __('Not Found', THEME_NS), 'content' => '<p class="center">' . $error_message . '</p>' . "\n" . theme_get_search()));
        if (theme_get_option('theme_show_random_posts_on_404_page')) {
            ob_start();
            echo '<h4 class="box-title">' . theme_get_option('theme_show_random_posts_title_on_404_page') . '</h4>';
            ?>
			<ul>
				<?php 
            global $post;
            $rand_posts = get_posts('numberposts=5&orderby=rand');
            foreach ($rand_posts as $post) {
                ?>
				<li><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></li>
				<?php 
            }
            ?>
			</ul>
			<?php 
            theme_post_wrapper(array('content' => ob_get_clean()));
        }
        if (theme_get_option('theme_show_tags_on_404_page')) {
            ob_start();
            echo '<h4 class="box-title">' . theme_get_option('theme_show_tags_title_on_404_page') . '</h4>';
            wp_tag_cloud('smallest=9&largest=22&unit=pt&number=200&format=flat&orderby=name&order=ASC');
            theme_post_wrapper(array('content' => ob_get_clean()));
        }
    }
Beispiel #3
0
function theme_404_content($args = '')
{
    $args = wp_parse_args($args, array('error_title' => __('Not Found', THEME_NS), 'error_message' => __('Apologies, but the page you requested could not be found. Perhaps searching will help.', THEME_NS), 'focus_script' => '<script type="text/javascript">jQuery(\'div.art-content input[name="s"]\').focus();</script>'));
    extract($args);
    theme_post_wrapper(array('title' => $error_title, 'content' => '<p class="center">' . $error_message . '</p>' . "\n" . theme_get_search() . $focus_script));
    if (theme_get_option('theme_show_random_posts_on_404_page')) {
        theme_ob_start();
        echo '<h4 class="box-title">' . theme_get_option('theme_show_random_posts_title_on_404_page') . '</h4>';
        ?>
		<ul>
		<?php 
        global $post;
        $rand_posts = get_posts('numberposts=5&orderby=rand');
        foreach ($rand_posts as $post) {
            ?>
				<li><a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a></li>
		<?php 
        }
        ?>
		</ul>
		<?php 
        theme_post_wrapper(array('content' => theme_ob_get_clean()));
    }
    if (theme_get_option('theme_show_tags_on_404_page')) {
        theme_ob_start();
        echo '<h4 class="box-title">' . theme_get_option('theme_show_tags_title_on_404_page') . '</h4>';
        wp_tag_cloud('smallest=9&largest=22&unit=pt&number=200&format=flat&orderby=name&order=ASC');
        theme_post_wrapper(array('content' => theme_ob_get_clean()));
    }
}
Beispiel #4
0
    theme_post_wrapper(array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span>' . get_search_query() . '</span>') . '</h4>'));
    /* Display navigation to next/previous pages when applicable */
    if (theme_get_option('theme_top_posts_navigation')) {
        theme_page_navigation();
    }
    /* Start the Loop */
    while (have_posts()) {
        the_post();
        get_template_part('content', get_post_format());
    }
    /* Display navigation to next/previous pages when applicable */
    if (theme_get_option('theme_bottom_posts_navigation')) {
        theme_page_navigation();
    }
} else {
    theme_post_wrapper(array('title' => __('Nothing Found', THEME_NS), 'content' => '<p class="center">' . __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS) . '</p>' . "\n" . theme_get_search()));
}
?>
			<?php 
get_sidebar('bottom');
?>
          <div class="cleared"></div>
        </div>
        <div class="art-layout-cell art-sidebar2">
         <div class="art-layout-glare">
          <div class="art-layout-glare-image"></div>
         </div>
          <?php 
get_sidebar('secondary');
?>
          <div class="cleared"></div>