• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_get_archives函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_get_archives函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_get_archives函数的具体用法?PHP wp_get_archives怎么用?PHP wp_get_archives使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_get_archives函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: widget

 /**
  * Widget
  *
  * @return   void
  * @since    1.0
  */
 function widget($args, $instance)
 {
     if (false == ($cache = get_transient('edd_widgets_archives'))) {
         // get the title and apply filters
         $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : '');
         // get show count boolean
         $show_count = isset($instance['show_count']) && $instance['show_count'] === 1 ? 1 : 0;
         // start collecting the output
         $out = "";
         // check if there is a title
         if ($title) {
             // add the title to the ouput
             $out .= $args['before_title'] . $title . $args['after_title'];
         }
         $out .= "<ul>\n";
         // add download post type to archives
         add_filter('getarchives_where', array(&$this, 'getarchives_where_filter'), 10, 2);
         add_filter('month_link', array($this, 'month_link'), 10, 3);
         // output the archives
         $out .= wp_get_archives(array('echo' => 0, 'show_post_count' => $show_count));
         // remove filter
         remove_filter('getarchives_where', array(&$this, 'getarchives_where_filter'), 10, 2);
         remove_filter('month_link', array($this, 'month_link'), 10, 3);
         // finish the list
         $out .= "</ul>\n";
         // set the widget's containers
         $cache = $args['before_widget'] . $out . $args['after_widget'];
         // store the result on a temporal transient
         set_transient('edd_widgets_archives', $cache);
     }
     echo $cache;
 }
开发者ID:Rexix,项目名称:edd-widgets-pack,代码行数:38,代码来源:edd-widget-archives.php


示例2: Grafik_Functions_Shortcode_TypeArchives

function Grafik_Functions_Shortcode_TypeArchives($atts, $content = '')
{
    global $wp_query;
    global $GRAFIK_MODE;
    $callback_output = '';
    $a = shortcode_atts(array('type' => 'post', 'format' => 'links', 'class' => '', 'id' => ''), $atts, 'TypeArchives');
    // Construct the query...
    $callback_query = new WP_Query(array('post_type' => $a['type'], 'posts_per_page' => -1));
    // Loop the query...
    preg_match_all("/<li><a[\\s]*href=[\"']([^\"']*)[\"'][^>]*>([^<]*)<\\/a>[^\\(]*\\(([^\\)]*)\\)<\\/li>/i", wp_get_archives(array('post_type' => $a['type'], 'type' => 'monthly', 'show_post_count' => true, 'echo' => 0)), $callback_archives);
    // Restructure the array...
    $callback_restructured = array();
    foreach ($callback_archives as $key => $val) {
        foreach ($val as $val_key => $val_val) {
            $callback_restructured[$val_key][$key] = $val_val;
        }
    }
    $callback_archives = $callback_restructured;
    // Loop the results...
    foreach ($callback_archives as $key => $val) {
        $callback_output .= '<li class="ge-typearchives-item">' . '<a href="' . esc_url($val[1]) . '" class="ge-typearchives-link">' . '<span class="ge-typearchives-name">' . $val[2] . '</span>' . '<span class="ge-typearchives-count">' . $val[3] . '</span>' . '</a>' . '</li>';
    }
    if (empty($callback_output)) {
        return '';
    }
    return '<div class="ge-typearchives-container' . (empty($a['class']) ? null : ' ' . $a['class']) . '"' . (empty($a['id']) ? null : ' id="' . $a['id'] . '"') . '>' . '<div class="ge-typearchives-content">' . $content . '</div>' . '<ul class="ge-typearchives-list' . ($a['format'] == 'dropdown' ? 'dropdown' : '') . '">' . $callback_output . '</ul>' . '</div>';
}
开发者ID:GrafikMatthew,项目名称:Grafik-Engine-Beta,代码行数:27,代码来源:TypeArchives.php


示例3: widget

    function widget($args, $instance)
    {
        $before_widget = $before_title = $after_title = $after_widget = '';
        extract($args);
        $c = !empty($instance['count']) ? '1' : '0';
        $d = !empty($instance['dropdown']) ? '1' : '0';
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives', 'zn_framework') : $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        if ($d) {
            ?>
			<select name="archive-dropdown"
					onchange='document.location.href=this.options[this.selectedIndex].value;'>
				<option value=""><?php 
            echo esc_attr(__('Select Month', 'zn_framework'));
            ?>
</option>
				<?php 
            wp_get_archives(apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $c)));
            ?>
 </select>
		<?php 
        } else {
            ?>
			<ul class="menu">
				<?php 
            wp_get_archives(apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $c)));
            ?>
			</ul>
		<?php 
        }
        echo $after_widget;
    }
开发者ID:rock1media,项目名称:wordpress,代码行数:35,代码来源:widget-archive.php


示例4: ts_sitemap_func

function ts_sitemap_func($atts)
{
    extract(shortcode_atts(array('sitemap' => ''), $atts));
    $html = '';
    ob_start();
    ?>
	<ul class="sitemap">
		<?php 
    switch ($sitemap) {
        case 'pages':
            wp_list_pages("title_li=");
            break;
        case 'posts':
            $archive_query = new WP_Query('showposts=1000&cat=-8');
            while ($archive_query->have_posts()) {
                $archive_query->the_post();
            }
            break;
        case 'archives':
            wp_get_archives('type=monthly&show_post_count=true');
            break;
        default:
            wp_list_pages("title_li=");
            break;
    }
    ?>
	</ul>


	<?php 
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:34,代码来源:sitemap.php


示例5: getWordpressData

    static function getWordpressData() {
        /**
         * Get all global page data
         */
        $blogDataParams = array(
            'url', 'wpurl', 'description', 'rdf_url' , 'rss_url', 'rss2_url'
            , 'atom_url', 'comments_atom_url', 'comments_rss2_url', 'pingback_url'
            , 'stylesheet_url', 'stylesheet_directory', 'template_directory'
            , 'template_url', 'admin_email', 'charset', 'html_type', 'version'
            , 'language', 'text_direction', 'name'
        );

        $blogData = array();

        foreach($blogDataParams as $blogDataParam) {
            $blogData[self::toCamelCase($blogDataParam)] = get_bloginfo($blogDataParam);
        }

        $blogData = array_merge($blogData, array(
            'title'            => wp_title(' | ', false, 'right') . get_bloginfo('name'),
            'archiveLinksHTML' => wp_get_archives('type=monthly&limit=5&format=link&echo=0'),
            'bodyClasses'      => self::getEchoFunctionContents('body_class'),
            'posts'            => array()
        ));

        /**
         * Get posts data
         */
        while (have_posts()) {
            the_post();
            
            $postId     = get_the_ID();

            // Get category data
            $categories = get_the_category();
            $categoryNames = array();
            foreach($categories as $category) {
                array_push($categoryNames, $category->cat_name);
            }

            // Add all relevant post data to the posts array
            array_push(
                $blogData['posts'],
                array_merge(
                    get_object_vars(get_post($postId)),
                    array(
                        'classes'       => get_post_class(),
                        'comments'      => get_comments(array('post_id' => $postId)),
                        'custom'        => get_post_custom(),
                        'permalink'     => get_permalink(),
                        'categories'    => $categories,
                        'categoryNames' => $categoryNames,
                        'categoriesStr' => implode(',', $categoryNames)
                    )
                )
            );
        }

        return $blogData;
    }
开发者ID:nottrobin,项目名称:rw-theme,代码行数:60,代码来源:SitesUtil.php


示例6: genesis_page_archive_content

/**
 * This function outputs sitemap-esque columns displaying all pages,
 * categories, authors, monthly archives, and recent posts.
 *
 * @since 1.6
 */
function genesis_page_archive_content()
{
    // Pause Exclude Pages plugin functionality.
    pause_exclude_pages();
    ?>
	
	<h4><?php 
    _e('Pages:', 'genesis');
    ?>
</h4>
	<ul>
		<?php 
    wp_list_pages('title_li=');
    ?>
	</ul>

	<h4><?php 
    _e('Categories:', 'genesis');
    ?>
</h4>
	<ul>
		<?php 
    wp_list_categories('sort_column=name&title_li=');
    ?>
	</ul>

	<h4><?php 
    _e('Authors:', 'genesis');
    ?>
</h4>
	<ul>
		<?php 
    wp_list_authors('exclude_admin=0&optioncount=1');
    ?>
	</ul>

	<h4><?php 
    _e('Monthly:', 'genesis');
    ?>
</h4>
	<ul>
		<?php 
    wp_get_archives('type=monthly');
    ?>
	</ul>

	<h4><?php 
    _e('Recent Posts:', 'genesis');
    ?>
</h4>
	<ul>
		<?php 
    wp_get_archives('type=postbypost&limit=100');
    ?>
	</ul>

	<?php 
    // Resume Exclude Pages plugin functionality.
    resume_exclude_pages();
}
开发者ID:roosalles,项目名称:trestle,代码行数:66,代码来源:page_archive_all_pages.php


示例7: archives_shortcode

 public static function archives_shortcode($atts)
 {
     $defaults = array('type' => 'monthly', 'limit' => '', 'show_post_count' => 0, 'order' => 'DESC');
     extract(shortcode_atts($defaults, $atts));
     $archives_args = array('type' => $type, 'limit' => $limit, 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => $show_post_count, 'echo' => 0, 'order' => $order);
     return '<ul>' . "\n" . wp_get_archives($archives_args) . '</ul>' . "\n" . '<!-- Powered by Extra Shortcodes wordpress.org/plugins/extra-shortcodes/ -->';
 }
开发者ID:webvitalii,项目名称:extra-shortcodes,代码行数:7,代码来源:extra-shortcodes.php


示例8: getSidebar

function getSidebar()
{
    $posts = $sidebar = '
	<div class="container-aside quiet">
		<h4 style="margin-bottom: .5em;" class="loud">Want another bite? Subscribe!</h4>
		<p><a href="http://feeds.feedburner.com/kennethreitz" target="_none">RSS</a>, <a href="http://feedburner.google.com/fb/a/mailverify?uri=kennethreitz&amp;loc=en_US" target="_none">Email</a>, <a href="http://friendfeed.com/kennethreitz" target="_none">FriendFeed</a>, <a href="http://twitter.com/kennethreitz" target="_none">Twitter</a>, <a href="http://www.facebook.com/pages/KennethReitzcom/144095770952?ref=ts" target="_none">Facebook</a>.<br/> If you see something that makes you shake with excitment or surge with rage, leave a comment and <a href="javascript:var%20e=document.createElement(\'script\');e.setAttribute(\'language\',\'javascript\');e.setAttribute(\'src\',\'http://bit.ly/bookmarklet/load.js\');document.body.appendChild(e);void(0);">send a link</a> to others!</p>
		
		<hr/>
		<h4 class="loud">About @KennethReitz</h4>
		<p>
		<strong>Kenneth Reitz, <em>n</em></strong>: 
		Open Mind. Open Source.<br/>
		<strong>Location?</strong> Winchester, Virginia. <br/>
		<strong>Field?</strong> Web Application Development <br/>
		<strong>What??</strong> I make websites.<br/>
		<strong>Language? </strong> Python. <em>Everything</em> else.<br/>
		<strong>Tools?</strong> MacBook + iPhone + Moleskine = 42.<br/>
		<strong>Anything Else?</strong> Life is wonderful.</p>
		<hr/>
		<h4>Latest Posts</h4>';
    echo $sidebar;
    echo wp_get_archives('format=custom&after=… &type=postbypost&limit=15&show_post_count=false');
    echo '<hr/>';
    echo '<p class="extra-quiet">';
    echo fortune(3000);
    echo '<p>';
    echo '</div></div>';
}
开发者ID:kennethreitz-archive,项目名称:monolithic-wordpress-theme,代码行数:28,代码来源:functions.php


示例9: wp_get_cat_archives

function wp_get_cat_archives($opts, $cat)
{
    $args = wp_parse_args($opts, array('echo' => '1'));
    // default echo is 1.
    // 与えられた $opts を解析して配列に入れ、第2引数 と結合
    $echo = $args['echo'] != '0';
    // remember the original echo flag.
    $args['echo'] = 0;
    $args['cat'] = $cat;
    $archives = wp_get_archives(build_query($args));
    // アーカイブ取得 // 連想配列からページ用のクエリー文字列を作る
    $archs = explode('</li>', $archives);
    // 配列化した変数
    $links = array();
    foreach ($archs as $archive) {
        $link = preg_replace("/href='([^']+)'/", "href='\$1?cat={$cat}'", $archive);
        // 正規表現での置き換え
        array_push($links, $link);
        // 配列の末尾に値を追加
    }
    $result = implode('</li>', $links);
    // 配列を連結して1つの文字列に
    if ($echo) {
        echo $result;
    } else {
        return $result;
    }
}
开发者ID:Benzoh,项目名称:BlogTheme,代码行数:28,代码来源:functions.php


示例10: master_array

 /**
  *
  * @TODO document
  *
  */
 function master_array()
 {
     $left = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p>%s<br class="clear"/><p>%s</p></div></div>', __('Looking for something?', 'pagelines'), __('Use the form below to search the site:', 'pagelines'), pagelines_search_form(false), __("Still not finding what you're looking for? Drop us a note so we can take care of it!", 'pagelines'));
     $middle = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p><ul>%s</ul></div></div>', __('Visit our friends!', 'pagelines'), __('A few highly recommended friends...', 'pagelines'), wp_list_bookmarks('title_li=&categorize=0&echo=0'));
     $right = sprintf('<div class="widget"><div class="widget-pad"><h3 class="widget-title">%s</h3><p>%s</p><ul>%s</ul></div></div>', __('Archives', 'pagelines'), __('All entries, chronologically...', 'pagelines'), wp_get_archives('type=monthly&limit=12&echo=0'));
     $this->master = array('left' => array('name' => 'MoreFoot Left', 'description' => __('Left sidebar in morefoot section.', 'pagelines'), 'default' => $left), 'middle' => array('name' => 'MoreFoot Middle', 'description' => __('Middle sidebar in morefoot section.', 'pagelines'), 'default' => $middle), 'right' => array('name' => 'MoreFoot Right', 'description' => __('Right sidebar in morefoot section.', 'pagelines'), 'default' => $right));
 }
开发者ID:climo,项目名称:PageLines-Framework,代码行数:12,代码来源:section.php


示例11: asdf_archive

function asdf_archive()
{
    ?>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js" type="text/javascript"></script>
	<script type="text/javascript" src="<?php 
    echo bloginfo('stylesheet_directory');
    ?>
/jsddm.js"></script> 
	<div class="widget"><div class="asdf_archive">
		<h1 class="widget-title">ARCHIVE</h1>
		<img src="<?php 
    echo bloginfo('stylesheet_directory');
    ?>
/media/pfeil_hellgrau_archiv.png" >
		<ul class="jsddm">
			<li><a href="">W&Auml;HLE DEN MONAT</a>
			<ul><?php 
    wp_get_archives('type=monthly&format=html&show_post_count=0');
    ?>
</ul>
			</li>
		</ul>
	</div></div>
<?php 
}
开发者ID:asdf-systems,项目名称:legourmand,代码行数:25,代码来源:asdf_archive.php


示例12: archives_shortcode

function archives_shortcode($attr)
{
    if (is_feed()) {
        return '[archives]';
    }
    global $allowedposttags;
    $default_atts = array('type' => 'postbypost', 'limit' => '', 'format' => 'html', 'showcount' => false, 'before' => '', 'after' => '', 'order' => 'desc');
    extract(shortcode_atts($default_atts, $attr));
    if (!in_array($type, array('yearly', 'monthly', 'daily', 'weekly', 'postbypost'))) {
        $type = 'postbypost';
    }
    if (!in_array($format, array('html', 'option', 'custom'))) {
        $format = 'html';
    }
    if ('' != $limit) {
        $limit = (int) $limit;
    }
    $showcount = (bool) $showcount;
    $before = wp_kses($before, $allowedposttags);
    $after = wp_kses($after, $allowedposttags);
    // Get the archives
    $archives = wp_get_archives('type=' . $type . '&limit=' . $limit . '&format=' . $format . '&echo=0&show_post_count=' . $showcount . '&before=' . $before . '&after=' . $after);
    if ('asc' == $order) {
        $archives = implode("\n", array_reverse(explode("\n", $archives)));
    }
    // Check to see if there are any archives
    if (empty($archives)) {
        $archives = '<p>' . __('Your blog does not currently have any published posts.', 'jetpack') . '</p>';
    } elseif ('option' == $format) {
        $archives = "<select name='archive-dropdown' onchange='document.location.href=this.options[this.selectedIndex].value;'><option value='" . get_permalink() . "'>--</option>" . $archives . "</select>";
    } elseif ('html' == $format) {
        $archives = '<ul>' . $archives . '</ul>';
    }
    return $archives;
}
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:35,代码来源:archives.php


示例13: widget

    function widget($args, $instance)
    {
        extract($args);
        /** This filter is documented in wp-includes/default-widgets.php */
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Accordion Archives') : $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		<ul>
<?php 
        /**
         * Filter the arguments for the Archives widget.
         *
         * @since 2.8.0
         *
         * @see wp_get_archives()
         *
         * @param array $args An array of Archives option arguments.
         */
        $archives = strip_tags(wp_get_archives(apply_filters('widget_accordion_archives_args', array('type' => 'monthly', 'format' => 'custom', 'echo' => 0, 'after' => ','))));
        $archives = explode(',', $archives);
        $months = array();
        $years = array();
        // Grab our years first
        foreach ($archives as $archive) {
            $archive = explode(' ', $archive);
            if (isset($archive[1])) {
                array_push($years, $archive[1]);
            }
        }
        $years = array_values(array_unique($years));
        $i = 0;
        foreach ($years as $year) {
            ?>
<li class="archive-accordion-year"><a><?php 
            echo $year;
            ?>
</a><ul><?php 
            foreach ($archives as $archive) {
                $archive = explode(' ', $archive);
                if (!empty($archive[1]) && $archive[1] == $year) {
                    echo '<li class="archive-accordion-month"><a href="' . get_month_link($year, date("m", strtotime($archive[0] . '-' . $year))) . '">' . trim($archive[0]) . '</a></li>';
                }
            }
            ?>
</ul><?php 
            ?>
</li><?php 
        }
        ?>
		</ul>
<?php 
        echo $after_widget;
    }
开发者ID:jazbek,项目名称:accordion-archive-widget,代码行数:56,代码来源:accordion-archive-widget.php


示例14: avia_dummy_widget

function avia_dummy_widget($number)
{
    switch ($number) {
        case 1:
            $title = apply_filters('widget_title', __('Interesting links', 'avia_framework'));
            ?>
				<section class='widget'>
				<h3 class='widgettitle'><?php 
            echo $title;
            ?>
</h3>
				<span class='minitext'><?php 
            _e('Here are some interesting links for you! Enjoy your stay :)', 'avia_framework');
            ?>
</span>
				</section>
			<?php 
            break;
        case 4:
            $title = apply_filters('widget_title', __('Archive', 'avia_framework'));
            echo "<section class='widget widget_archive'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_get_archives('type=monthly');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 3:
            $title = apply_filters('widget_title', __('Categories', 'avia_framework'));
            echo "<section class='widget widget_categories'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_categories('sort_column=name&optioncount=0&hierarchical=0&title_li=');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 2:
            $title = apply_filters('widget_title', __('Pages', 'avia_framework'));
            echo "<section class='widget widget_pages'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_pages('title_li=&depth=-1');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
        case 5:
            $title = apply_filters('widget_title', __('Bookmarks', 'avia_framework'));
            echo "<section class='widget widget_archive'>";
            echo "<h3 class='widgettitle'>" . $title . "</h3>";
            echo "<ul>";
            wp_list_bookmarks('title_li=&categorize=0');
            echo "</ul>";
            echo "<span class='seperator extralight-border'></span></section>";
            break;
    }
}
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:56,代码来源:register-widget-area.php


示例15: thesis_archives_template

function thesis_archives_template()
{
    echo "\t\t\t\t\t<h3 class=\"top\">" . __('By Month:', 'thesis') . "</h3>\n";
    echo "\t\t\t\t\t<ul>\n";
    wp_get_archives('type=monthly');
    echo "\t\t\t\t\t</ul>\n";
    echo "\t\t\t\t\t<h3>" . __('By Category:', 'thesis') . "</h3>\n";
    echo "\t\t\t\t\t<ul>\n";
    wp_list_categories('title_li=0');
    echo "\t\t\t\t\t</ul>\n";
}
开发者ID:CherylMuniz,项目名称:fashion,代码行数:11,代码来源:templates.php


示例16: vd_posts_volume_count

function vd_posts_volume_count($number_of_months = 6)
{
    $a = wp_get_archives('type=monthly&show_post_count=1&format=custom&echo=0&limit=' . $number_of_months);
    $entries = explode('&nbsp;', $a);
    array_walk($entries, 'vd_post_count_from_entry');
    $number_of_entries = array_sum(array_filter($entries));
    $stats = array();
    $stats['total_entries'] = $number_of_entries;
    $stats['total_months'] = $number_of_months;
    $stats['postvolume'] = round($number_of_entries / $number_of_months);
    return $stats;
}
开发者ID:svandragt,项目名称:wordpress-vandragt,代码行数:12,代码来源:functions.widgets.php


示例17: widget

    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        /* Our variables from the widget settings. */
        $title = apply_filters('widget_title', $instance['title']);
        $type = $instance['type'];
        /* Before widget (defined by themes). */
        echo $before_widget;
        /* Display the widget title if one was input (before and after defined by themes). */
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

        	<div class="archive-list">

			<?php 
        if ($type == 'pages') {
            $page_s = explode('</li>', wp_list_pages('title_li=&echo=0&depth=1&style=none'));
        } elseif ($type == 'categories') {
            $page_s = explode('</li>', wp_list_categories('show_count=0&title_li=&echo=0&depth=-1'));
        } else {
            $page_s = explode('</li>', wp_get_archives('type=monthly&echo=0'));
        }
        $page_n = count($page_s) - 1;
        $page_col = round($page_n / 2);
        $page_left = '';
        $page_right = '';
        for ($i = 0; $i < $page_n; $i++) {
            if ($i < $page_col) {
                $page_left = $page_left . '' . $page_s[$i] . '</li>';
            } elseif ($i >= $page_col) {
                $page_right = $page_right . '' . $page_s[$i] . '</li>';
            }
        }
        ?>
					<ul class="left">
					<?php 
        echo $page_left;
        ?>
					</ul>
					<ul class="right">
					<?php 
        echo $page_right;
        ?>
					</ul>
				</div>

		<?php 
        /* After widget (defined by themes). */
        echo $after_widget;
    }
开发者ID:ignacioabejaro,项目名称:xtecblocs,代码行数:55,代码来源:archives-widget.php


示例18: widget_helia_archives

function widget_helia_archives()
{
    ?>
<li id="archives" class="minibox widget">
	<h3>Archives</h3>
    <ul>
		<?php 
    wp_get_archives('type=monthly');
    ?>
     </ul>
</li>
<?php 
}
开发者ID:seanlin,项目名称:Helia,代码行数:13,代码来源:functions.php


示例19: jc_spotlight_archives_list

/**
 * Lists the Spotlight archives list.
 *
 * @since 1.3.0
 * @access private
 */
function jc_spotlight_archives_list()
{
    ?>
	<li class="spotlight-archives">
		<h3 class="widget-title">
			Archives
		</h3>
		<?php 
    wp_get_archives(array('post_type' => 'jc-spotlight', 'type' => 'yearly'));
    ?>
	</li>
	<?php 
}
开发者ID:JacksonCollege,项目名称:jc-theme-2015,代码行数:19,代码来源:spotlight-hooks.php


示例20: wsm_sitemap

function wsm_sitemap($heading = 'h2')
{
    // edit these functions as desired with the parameters listed in the WordPress Codex
    $sitemap = sprintf('<%2$s>%1$s</%2$s>', __('Pages:', 'genesis'), $heading);
    $sitemap .= sprintf('<ul>%s</ul>', wp_list_pages('title_li=&echo=0'));
    $sitemap .= sprintf('<%2$s>%1$s</%2$s>', __('Categories:', 'genesis'), $heading);
    $sitemap .= sprintf('<ul>%s</ul>', wp_list_categories('sort_column=name&title_li=&echo=0'));
    $sitemap .= sprintf('<%2$s>%1$s</%2$s>', __('Monthly:', 'genesis'), $heading);
    $sitemap .= sprintf('<ul>%s</ul>', wp_get_archives('type=monthly&echo=0'));
    $sitemap .= sprintf('<%2$s>%1$s</%2$s>', __('Recent Posts:', 'genesis'), $heading);
    $sitemap .= sprintf('<ul>%s</ul>', wp_get_archives('type=postbypost&limit=100&echo=0'));
    echo $sitemap;
}
开发者ID:netmagik,项目名称:netmagik,代码行数:13,代码来源:sitemap.php



注:本文中的wp_get_archives函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_get_associated_nav_menu_items函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_get_active_network_plugins函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap