本文整理汇总了PHP中the_id函数的典型用法代码示例。如果您正苦于以下问题:PHP the_id函数的具体用法?PHP the_id怎么用?PHP the_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了the_id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: hm_sort_slides
/**
* Display slide Sort admin
*
* @author Soul
**/
function hm_sort_slides()
{
$slide = new WP_Query('post_type=slide&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<h3>Sort Slides <img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
<ul id="video-list">
<?php
while ($slide->have_posts()) {
$slide->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
echo the_post_thumbnail(array(60, 60));
?>
<?php
the_title();
?>
</li>
<?php
}
?>
</div><!-- End div#wrap //-->
<?php
}
开发者ID:bryanmonzon,项目名称:jenjonesdirect,代码行数:36,代码来源:f_custom_posts_slide.php
示例2: mvm_display_singer_list
function mvm_display_singer_list()
{
$args = array('post_type' => 'singer', 'posts_per_page' => -1, 'post_status' => 'published');
$singers = new WP_Query($args);
if ($singers->have_posts()) {
?>
<ul class="mvm_singers_list">
<?php
while ($singers->have_posts()) {
$singers->the_post();
?>
<li id="singer-<?php
the_id();
?>
" class="mvm_singer" singer-id="<?php
the_id();
?>
">
<?php
the_title();
?>
</li>
<?php
}
wp_reset_postdata();
?>
</ul>
<?php
}
}
开发者ID:sousatg,项目名称:WP-Music-Video-Manager,代码行数:30,代码来源:mvm_template.php
示例3: mtheme_sort_portfolio
/**
* Display Sort admin
*
* @return void
* @author Soul
**/
function mtheme_sort_portfolio()
{
$portfolio = new WP_Query('post_type=mtheme_portfolio&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<h2>Sort portfolio Slides<img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
<div class="description">
Drag and Drop the slides to order them
</div>
<ul id="portfolio-list">
<?php
while ($portfolio->have_posts()) {
$portfolio->the_post();
?>
<li id="<?php
the_id();
?>
">
<div>
<?php
$image_url = wp_get_attachment_thumb_url(get_post_thumbnail_id());
$custom = get_post_custom(get_the_ID());
$portfolio_cats = get_the_terms(get_the_ID(), 'types');
?>
<?php
if ($image_url) {
echo '<img class="mtheme_admin_sort_image" src="' . $image_url . '" width="30px" height="30px" alt="" />';
}
?>
<span class="mtheme_admin_sort_title"><?php
the_title();
?>
</span>
<?php
if ($portfolio_cats) {
?>
<span class="mtheme_admin_sort_categories"><?php
foreach ($portfolio_cats as $taxonomy) {
echo ' | ' . $taxonomy->name;
}
?>
</span>
<?php
}
?>
</div>
</li>
<?php
}
?>
</div><!-- End div#wrap //-->
<?php
}
开发者ID:rongandat,项目名称:scalaprj,代码行数:64,代码来源:portfolio-post-sorter.php
示例4: omtm_testimonials_sort_page
function omtm_testimonials_sort_page()
{
$query = new WP_Query('post_type=testimonials&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<div id="icon-edit-pages" class="icon32 icon32-posts-page"><br /></div>
<h2><?php
_e('Sort Testimonials', 'om_testimonials');
?>
</h2>
<p><?php
_e('Sort Testimonials by drag-n-drop. Items at the top will appear first.', 'om_testimonials');
?>
</p>
<ul id="omtm_testimonials_items">
<?php
while ($query->have_posts()) {
$query->the_post();
?>
<?php
if (get_post_status() == 'publish') {
?>
<li id="<?php
the_id();
?>
" class="menu-item">
<dl class="menu-item-bar">
<dt class="menu-item-handle">
<span class="menu-item-title"><?php
the_title();
?>
</span>
</dt>
</dl>
<ul class="menu-item-transport"></ul>
</li>
<?php
}
?>
<?php
}
?>
</ul>
</div>
<script>
jQuery(function($){
omtm_items_sort('#omtm_testimonials_items','omtm_testimonials_apply_sort');
});
</script>
<?php
wp_reset_postdata();
?>
<?php
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:55,代码来源:custom-post.php
示例5: hide_case_studies
function hide_case_studies()
{
$the_page_id = the_id();
$ids_to_hide = array(182);
$should_hide = false;
foreach ($ids_to_hide as $id) {
if ($the_page_id == id) {
$should_hide == true;
}
}
return $should_hide;
}
开发者ID:richardriffraff,项目名称:Sherpa,代码行数:12,代码来源:functions.php
示例6: reorder_admin_jobs_callback
function reorder_admin_jobs_callback()
{
$args = array('post_type' => 'job', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_status' => 'publish', 'no_found_rows' => true, 'update_post_term_cache' => false, 'post_per_post' => 50);
$job_listing = new WP_Query($args);
?>
<div id="job-sort" class="wrap">
<div id="icon-job-admin" class="icon32"><br /></div>
<h2><?php
_e('Sort Job Positions', 'wp-job-listing');
?>
<img src="<?php
echo esc_url(admin_url() . '/images/loading.gif');
?>
" id="loading-animation"></h2>
<?php
if ($job_listing->have_posts()) {
?>
<p><?php
_e('<strong>Note:</strong> this only affects the Jobs listed using the shortcode functions', 'wp-job-listing');
?>
</p>
<ul id="custom-type-list">
<?php
while ($job_listing->have_posts()) {
$job_listing->the_post();
?>
<li id="<?php
esc_attr(the_id());
?>
"><?php
esc_html(the_title());
?>
</li>
<?php
}
?>
</ul>
<?php
} else {
?>
<p><?php
_e('You have no Jobs to sort.', 'wp-job-listing');
?>
</p>
<?php
}
?>
</div>
<?php
}
开发者ID:JulienLavoieLeblanc,项目名称:wp-job-listing,代码行数:52,代码来源:wp-job-settings.php
示例7: theme_portfolio_sort
function theme_portfolio_sort()
{
$portfolios = new WP_Query('post_type=portfolio&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<div id="icon-tools" class="icon32"><br /></div>
<h2><?php
_e('Sort Portfolio Items', 'framework');
?>
</h2>
<p><?php
_e('Drag portfolio items to organize.', 'framework');
?>
</p>
<ul id="portfolio_list">
<?php
while ($portfolios->have_posts()) {
$portfolios->the_post();
?>
<?php
if (get_post_status() == 'publish') {
?>
<li id="<?php
the_id();
?>
" class="menu-item">
<dl class="menu-item-bar">
<dt class="menu-item-handle">
<span class="menu-item-title"><?php
the_title();
?>
</span>
</dt>
</dl>
<ul class="menu-item-transport"></ul>
</li>
<?php
}
?>
<?php
}
?>
<?php
wp_reset_postdata();
?>
</ul>
</div>
<?php
}
开发者ID:ArnaudGuillou,项目名称:SiteESBVolley,代码行数:50,代码来源:post-type-portfolio.php
示例8: tpp_posts_widget
function tpp_posts_widget()
{
$tpp_posts_query = new WP_Query('&posts_per_page=10&orderby=comment_count&order=DESC');
?>
<h3><?php
_e('Top Posts:');
?>
</h3>
<?php
if ($tpp_posts_query->have_posts()) {
while ($tpp_posts_query->have_posts()) {
$tpp_posts_query->the_post();
?>
<div class="tpp_posts">
<a href="<?php
echo the_permalink();
?>
"
id="<?php
echo the_id();
?>
"
title="<?php
echo the_title();
?>
"
class="comment_link"><?php
echo the_title();
?>
</a>
(<?php
echo comments_number();
?>
)
</div>
<?php
}
}
?>
<?php
}
开发者ID:kirandash,项目名称:bijiplugindfly,代码行数:41,代码来源:top_posts.php
示例9: top_post
function top_post()
{
$query = new WP_Query(array('posts_per_page' => 5, 'orderby' => 'date', 'order' => 'DESC'));
?>
<h3>Posts on this page</h3>
<ul>
<?php
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
?>
<div class="tpp_posts">
<a href="<?php
echo the_permalink();
?>
"
id="<?php
echo the_id();
?>
"
title="<?php
echo the_title();
?>
"
class="comment_link"><?php
echo the_title();
?>
</a>
(<?php
echo comments_number();
?>
)
</div>
<?php
}
}
?>
</ul>
<?php
}
开发者ID:sondang86,项目名称:mySite,代码行数:40,代码来源:top-posts-widget.php
示例10: rah_get_secret_groups_ajax
function rah_get_secret_groups_ajax()
{
$sg_query = new WP_Query("post_type=groups&orderby=title&order=ASC&posts_per_page=-1&meta_key=_rah_secret_group&meta_value=1");
if ($sg_query->have_posts()) {
?>
<p id="existing_secret">
<select id="existing_groups" name="existing_secret_group">
<option value="-1">Select A Group</option>
<?php
while ($sg_query->have_posts()) {
$sg_query->the_post();
?>
<option value="<?php
the_id();
?>
"><?php
the_title();
?>
</option><?php
}
?>
</select> <input type="checkbox" id="group_not_listed" name="group_not_listed" value="1"> <label for="group_not_listed">My Group Isn't Listed</label>
</p>
<p id="new_secret_group" style="display:none;">
<input type="text" size="50" id="new_secret_group_title" name="new_secret_group_title" value="" placeholder="Your Group Name">
<textarea name="new_secret_group_description" placeholder="Group Description. You can copy this from your Facebook Group."></textarea>
</p>
<?php
} else {
?>
<p id="new_secret_group">
<input type="hidden" name="group_not_listed" value="1" />
<input type="text" size="50" id="new_secret_group_title" name="new_secret_group_title" value="" placeholder="Your Group Name">
<textarea name="new_secret_group_description" placeholder="Group Description. You can copy this from your Facebook Group."></textarea>
</p>
<?php
}
die;
}
开发者ID:xpresservers,项目名称:rate-a-host,代码行数:39,代码来源:general-functions.php
示例11: jwt_a_f_p_posts_sort_callback
function jwt_a_f_p_posts_sort_callback()
{
$faq = new WP_Query('post_type=faq&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<h3>Sort FAQ<img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
<ul id="slide-list">
<?php
if ($faq->have_posts()) {
?>
<?php
while ($faq->have_posts()) {
$faq->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
the_title();
?>
</li>
<?php
}
?>
<?php
} else {
?>
<li>There is no FAQ was Created !!!</li>
<?php
}
?>
</ul>
</div>
<?php
}
开发者ID:WP-Panda,项目名称:allergenics,代码行数:38,代码来源:sorting.php
示例12: client_posts_sort_callback
function client_posts_sort_callback()
{
$clients = new WP_Query('post_type=client&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<h3>Sort Clients<img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h3>
<ul id="slide-list">
<?php
if ($clients->have_posts()) {
?>
<?php
while ($clients->have_posts()) {
$clients->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
the_title();
?>
</li>
<?php
}
?>
<?php
} else {
?>
<li>There is no Slide Created</li>
<?php
}
?>
</ul>
</div>
<?php
}
开发者ID:sajjadalisiddiqui,项目名称:cms,代码行数:38,代码来源:starter-client.php
示例13: sort_quotes_custom_1
function sort_quotes_custom_1()
{
$quotes = new WP_Query('post_type=quotes-custom-1&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<div id="icon-tools" class="icon32"><br /></div>
<h2><?php
_e('Sort Quote Items', 'nash');
?>
<img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
<p><?php
_e('Click, drag, re-order. Repeat as neccessary. Quote item at the top will appear first on your page.', 'nash');
?>
</p>
<ul id="post-list">
<?php
while ($quotes->have_posts()) {
$quotes->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
the_title();
?>
</li>
<?php
}
?>
</div>
<?php
}
开发者ID:magalere,项目名称:civio.es,代码行数:36,代码来源:quotes-custom-1-type.php
示例14: sort_team
function sort_team()
{
$team = new WP_Query('post_type=team&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div class="wrap">
<div id="icon-tools" class="icon32"><br /></div>
<h2><?php
_e('Sort Team Members', 'kula');
?>
<img src="<?php
echo home_url();
?>
/wp-admin/images/loading.gif" id="loading-animation" /></h2>
<p><?php
_e('Click, drag, re-order. Repeat as neccessary. Team Member at the top will appear first on your page.', 'kula');
?>
</p>
<ul id="post-list">
<?php
while ($team->have_posts()) {
$team->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
the_title();
?>
</li>
<?php
}
?>
</div>
<?php
}
开发者ID:villalonjeremie,项目名称:velocityslide,代码行数:36,代码来源:team-type.php
示例15: sort_page
/**
* Sort Page
*
* @return WP_FAQ_Manager
*/
public function sort_page()
{
$questions = new WP_Query('post_type=question&posts_per_page=-1&orderby=menu_order&order=ASC');
?>
<div id="faq-admin-sort" class="wrap">
<div id="icon-faq-admin" class="icon32"><br /></div>
<h2><?php
_e('Sort FAQs', 'wpfaq');
?>
<img src=" <?php
echo admin_url();
?>
/images/loading.gif" id="loading-animation" /></h2>
<?php
if ($questions->have_posts()) {
?>
<p><?php
_e('<strong>Note:</strong> this only affects the FAQs listed using the shortcode functions', 'wpfaq');
?>
</p>
<ul id="custom-type-list">
<?php
while ($questions->have_posts()) {
$questions->the_post();
?>
<li id="<?php
the_id();
?>
"><?php
the_title();
?>
</li>
<?php
}
?>
</ul>
<?php
} else {
?>
<p><?php
_e('You have no FAQs to sort.', 'wpfaq');
?>
</p>
<?php
}
?>
</div>
<?php
}
开发者ID:Coop920,项目名称:Sterling-Wellness,代码行数:55,代码来源:faq-manager.php
示例16: the_title
<?php
}
?>
</div>
<div class="lp-title-cont left">
<p class="latest-post-sidebar-title"><a class="a-invert" href="#"><?php
the_title();
?>
</a></p>
<p class="latest-post-sidebar-date"><?php
zerif_posted_on();
?>
</p>
<p class="latest-post-sidebar-comm"><?php
wp_count_comments(the_id());
?>
comments</p>
</div>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<!-- TAGS WIDGET -->
<div class="title-lines-sidebar m-bot-30">
开发者ID:pandhu,项目名称:sharima,代码行数:31,代码来源:sidebar.php
示例17: rss2
public static function rss2()
{
header('Content-Type: application/rss+xml; charset=' . get_option('encoding', 'utf-8'), true);
echo '<?xml version="1.0" encoding="' . get_option('encoding', 'utf-8') . '"?' . '>';
?>
<!-- Generated by Lilina/<?php
echo LILINA_CORE_VERSION;
?>
-->
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
<?php
do_action('rss2_ns');
?>
>
<channel>
<title><?php
echo get_option('sitename');
?>
</title>
<link><?php
echo get_option('baseurl');
?>
</link>
<description><?php
echo get_option('sitename');
?>
</description>
<atom:link href="<?php
echo get_option('baseurl');
?>
rss.php" rel="self" type="application/rss+xml" />
<?php
//Need to fix this
?>
<pubDate><?php
echo date('D, d M Y H:i:s +0000');
?>
</pubDate>
<generator>http://getlilina.org/?v=<?php
echo LILINA_CORE_VERSION;
?>
</generator>
<language><?php
echo get_option('lang');
?>
</language>
<?php
do_action('rss2_head');
if (has_items()) {
while (has_items()) {
the_item();
?>
<item>
<title><![CDATA[<?php
the_title();
?>
]]></title>
<link><?php
the_link();
?>
</link>
<pubDate><?php
the_date(array('format' => 'D, d M Y H:i:s +0000'));
?>
</pubDate>
<?php
//Not entirely accurate; uses the feed name, not the author
?>
<dc:creator><?php
the_feed_name();
?>
</dc:creator>
<guid isPermaLink="false"><?php
the_id();
?>
</guid>
<description><![CDATA[<?php
the_summary();
?>
]]></description>
<content:encoded><![CDATA[<?php
the_content();
?>
]]></content:encoded>
<?php
do_action('rss2_item');
?>
</item>
<?php
}
}
?>
</channel>
</rss>
//.........这里部分代码省略.........
开发者ID:rmccue,项目名称:Lilina,代码行数:101,代码来源:method-feed.php
示例18: output_row
/**
* Post Row Output
*
* @author Ronald Huereca <[email protected]>
* @since Reorder 2.1.0
* @access private
* @param stdclass $post object to post
*/
private function output_row($post)
{
global $post;
setup_postdata($post);
?>
<li id="list_<?php
the_id();
?>
" data-id="<?php
the_id();
?>
" data-menu-order="<?php
echo absint($post->menu_order);
?>
" data-parent="<?php
echo absint($post->post_parent);
?>
" data-post-type="<?php
echo esc_attr($post->post_type);
?>
">
<?php
//Get the children
$args = array('post_type' => $this->post_type, 'post_status' => $this->post_status, 'posts_per_page' => 100, 'post_parent' => get_the_ID(), 'orderby' => 'menu_order', 'order' => $this->order);
$children = new WP_Query($args);
//Output parent title
if ($children->have_posts()) {
?>
<div><?php
the_title();
echo defined('REORDER_DEBUG') && REORDER_DEBUG == true ? ' - Menu Order:' . absint($post->menu_order) : '';
?>
<a href='#' style="float: right"><?php
esc_html_e('Expand', 'metronet-reorder-posts');
?>
</a></div>
<?php
} else {
?>
<div><?php
the_title();
echo defined('REORDER_DEBUG') && REORDER_DEBUG == true ? ' - Menu Order:' . absint($post->menu_order) : '';
?>
</div>
<?php
}
if ($children->have_posts()) {
echo '<ul class="children">';
while ($children->have_posts()) {
global $post;
$children->the_post();
$this->output_row($post);
}
echo '</ul>';
}
?>
</li>
<?php
}
开发者ID:joystickinteractive,项目名称:wp-reorder-posts,代码行数:67,代码来源:class-reorder.php
示例19: widget
/**
* Outputs the content of the widget
*
* @param array $args
* @param array $instance
*/
public function widget($args, $instance)
{
// outputs the content of the widget
extract($args, EXTR_SKIP);
$title = apply_filters('widget_title', $instance['title']);
if (isset($args['before_widget'])) {
echo $args['before_widget'];
}
if (!empty($title)) {
echo $args['before_title'] . $title . $args['after_title'];
}
$queryargs = array('post_type' => 'rotary_projects', 'posts_per_page' => -1, 'order' => 'DESC', 'orderby' => 'meta_value', 'meta_key' => 'rotary_project_date');
$query = new WP_Query($queryargs);
if ($query->have_posts()) {
?>
<select id="projectwidget" name="projectwidget">
<option value=""><?php
echo _e('Select Project', 'Rotary');
?>
</option>
<?php
while ($query->have_posts()) {
$query->the_post();
?>
<option value="<?php
echo get_site_url();
?>
/posts/?projectid=<?php
the_id();
?>
" <?php
echo get_the_id() == $_REQUEST['projectid'] ? 'selected="selected"' : '';
?>
><?php
the_title();
?>
</option>
<?php
}
?>
</select>
<?php
// Reset Post Data
wp_reset_postdata();
?>
<?php
}
if (isset($args['after_widget'])) {
echo $args['after_widget'];
}
}
开发者ID:koolkatwebdesigns,项目名称:rotary,代码行数:59,代码来源:theme-widgets.php
示例20: theme_dir
-->
</style><head>
<title>لینکدونی پرشین اسکریپت</title>
</head>
<body dir="rtl" link="#000000" vlink="#333300" alink="#216269">
<div style="text-align:right; direction:rtl">
<img border="0" src="<?php
echo theme_dir();
?>
img/linkdump.gif" width="11" height="9"> لینکدونی - مطالب جالب
و خواندنی از سراسر وب
<br>
<br>
<?php
if (have_link()) {
while (have_link()) {
the_link();
echo "<a href='link-" . the_id() . ".html' target='_blank' title='" . the_title() . "'>" . the_title() . " [" . the_count() . "]</a><br>";
}
}
?>
<br><a href="<?php
echo site_url();
?>
" target="_blank">:: ادامه - آرشیو لینکدونی</a>
</div>
</body>
</html>
开发者ID:ghahremany,项目名称:linkam,代码行数:31,代码来源:box.php
注:本文中的the_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论