當前位置: 首頁>>代碼示例>>PHP>>正文


PHP theme_404_content函數代碼示例

本文整理匯總了PHP中theme_404_content函數的典型用法代碼示例。如果您正苦於以下問題:PHP theme_404_content函數的具體用法?PHP theme_404_content怎麽用?PHP theme_404_content使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了theme_404_content函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: theme_post_wrapper

    theme_post_wrapper(array('content' => ob_get_clean(), 'class' => 'breadcrumbs'));
    /* 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_404_content();
}
?>
			<?php 
get_sidebar('bottom');
?>
              <div class="cleared"></div>
            </div>
            <div class="art-layout-cell art-sidebar1">
              <?php 
get_sidebar('default');
?>
              <div class="cleared"></div>
            </div>
        </div>
    </div>
開發者ID:numfocus,項目名稱:website,代碼行數:31,代碼來源:archive.php

示例2: theme_post_wrapper

    theme_post_wrapper(array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span class="search-query-string">' . 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_404_content(array('error_title' => __('Nothing Found', THEME_NS), 'error_message' => __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS)));
}
?>
			<?php 
get_sidebar('bottom');
?>
              <div class="cleared"></div>
            </div>
            <div class="art-layout-cell art-sidebar1">
              <?php 
get_sidebar('default');
?>
              <div class="cleared"></div>
            </div>
        </div>
    </div>
開發者ID:numfocus,項目名稱:website,代碼行數:31,代碼來源:search.php


注:本文中的theme_404_content函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。