$random_query->the_post();?><a href="<?phpthe_permalink(); ?> "title="<?php the_title(); ?> "><?phpthe_title();?><?php}echo""; }echo$after_widget; } 开发者ID:anhqui,项目名称:RANDPOST_WIDGET,代码行数:31,代码来源:rand_post.php 示例2: widget ▲点赞 5▼ functionwidget($...
the_permalink()必须用在主循环(loop)中,该标签通常用来显示页面上文章的固定链接。由于the_permalink()只能显示正在被主循环处理的文章的固定链接,因此用户无法用它来显示任意文章。如果你希望显示某篇文章的固定链接,并且你知道这篇文章的ID,可以考虑使用get_permalink()。 用法 <?phpthe_permalink(); ?> 参数 ...
phpthe_permalink(); ?> "><?phpthe_title(); ?> <?phpechocb_byline(false, $cb_post_id,true); ?> <?php//...这里部分代码省略... 开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:101,代码来源:cb-recent-posts-widget.php 示例6: the_permalink ▲点赞 1▼ echo''. $cb_title_hea...
> the_permalink() 将文章URL作为文本形式显示 <a href="<?php the_permalink(); ?>">permalink the_title() <?php the_title($before,$after,$display); ?> <?php the_title('', ''); ?> 显示或返回当前日志的标题,类似函数the_title_attribute(); Bloginfo() 参考: http://www.wordpress.la/...
< a href="< ?php the_permalink(); ?>">< ?php the_title(); ?> < ul> < ul> < a href="< ?php the_permalink(); ?>"> < ?php if(has_post_thumbnail()) { //如果有特色图片,就调用特色图片 the_post_thumbnail( 'thumbnail' , ...
the_permalink() 用途:调用当前信息的网址,必须在主循环内使用 <?php the_permalink(); ?> the_content() 用途:显示内容, 如果文章插入了more标签 <?php the_content( 'Read more ...' ); ?> 有参数的情况下: the_excerpt() 用途:调用摘要,如果没有填写摘要则截取文章前55个字符 ...
<loc><?php the_permalink(); ?></loc> <lastmod><?php the_time('c') ?></lastmod> <changefreq>monthly</changefreq> <priority>0.6</priority> <data> <display> <!-- 以下三种版式,请根据实际手机站版式选择 --> <?php echo str_replace("","m.",the_sitemaplink()); ?> <wml_url><?p...
4.“the_content”函数将内容附加到页面插入的文件标题上。" the_permalink "函数匹配每个post的链接,这样在主页上未显示全文时,用户也可以访问到内容。 如果想在文件标题下添加一个简短的摘要,摘要包含内容的前200个字符,只需插入“the_excerpt”函数来代替“the_content”函数。因此,用户在单击链接时只能访问全文。
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php if ( has_post_thumbnail() ): ?> <?php the_post_thumbnail('thumb-medium'); ?> <?php elseif ( ot_get_option('placeholder') != 'off' ): ?> ...
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?> <?php the_excerpt(); ?> <!-...