巫冰吧
关注: 13 贴子: 384

  • 目录:
  • 个人贴吧
  • 1
    1.一键卖绿装 打开商店后按此宏。 /脚本 local q;if MerchantFrame:IsVisible()then for i=1,300 do q=GetContainerItemLink(i/35,i%35)if q and q:sub(5,10)=="1eff00"then UseContainerItem(i/35,i%35)end;end;end 2.一键卖蓝装 /脚本 local q;if MerchantFrame:IsVisible()then for i=1,300 do q=GetContainerItemLink(i/35,i%35)if q and q:sub(5,10)=="0070dd"then UseContainerItem(i/35,i%35)end;end;end 3.一键卖紫装 /脚本 local q;if MerchantFrame:IsVisible()then for i=1,300 do q=GetContainerItemLink(i/35,i%35)if q and q:sub(5,10)=="a335ee"then UseContainerIt
  • 1
    a:hover{ font-size: 20px; } a可任意换 亲测可用
    叶勇_康 4-14
  • 0
    webkit-border-radius: 10px;border-radius: 5px;
  • 0
    height:30px;line-height:30px;
  • 1
    <?php$price= get_post_meta($post->ID, 'price', true);echo $price;?> 其中price为自定义栏目名称
  • 2
    <?php if (has_post_thumbnail()){ $array_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array(255,204)); echo $array_image_url[0]; } ?>
  • 0
    <div id="left_layer" style="position:fixed; top:220px; left:0px;"> <img src="图片地址"><br&
  • 0
    在<?php while ( have_posts() ) : the_post(); ?>之前添加<?php $posts = query_posts($query_string . '&orderby=modified');?>
  • 1
    方法一: <?php $args = array( 'p' => 6198, // ID of a page, post, or custom type 'post_type' => 'post', 'posts_per_page' => 1 ); $the_query = new WP_Query( $args ); ?> <?php if ( $the_query->have_posts() ) : ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php endwhile; ?> <!-- end of the loop --> <?php wp_reset_postdata(); ?> <?php else : ?> <?php endif; ?> 方法二: &l
  • 0
    <script language="JavaScript"> for (var i=1; i<= 20; i++) { document.write ("&nbsp;") } </script> 20
  • 0
    <?php $post_id = 2408; $postArray = get_post($post_id, ARRAY_A); $title = $postArray['post_title']; $url = $postArray['guid']; echo "<a href=" . $url. ">" .$title. "</a>" ; ?> 2048是文章ID
  • 0
    <?php function custom_loginlogo_url($url) { return 'https://www.xiaoqijiazu.com'; //修改URL地址 } add_filter( 'login_headerurl', 'custom_loginlogo_url' ); ?>
  • 0
    <iframe src="http://fm.baidu.com" scrolling="no" frameborder="0" height="550px" id="mainFrame" width="100%" onload='IFrameReSize("mainFrame");IFrameReSizeWidth("mainFrame");'></iframe>
  • 0
    <div align="center"><iframe id="tv_iframe" width="900" height="500" src="http://live.64ma.com/tv/live.html" scrolling="yes"></iframe></div>
  • 0
    <div align="center"><marquee direction=’left’ loop=10 width=960 height=18 scrollamount=30 scrolldelay=300 onmouseover=”this.stop()” onmouseover=”this.start()”> <?php global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,comment_author_url, SUBSTRING(comment_content,1,30) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comm
  • 0
    在<head>与</head>之间任意地方(一般加到<title>下面比较美观)加上如下代码: <?php //首页 if (is_home()){ $keywords = "你网站首页的关键字"; $description = "你网站首页的描述"; } //分类页 elseif (is_category()){ $keywords = single_cat_title('', false); $description = category_description(); } //标签页 elseif (is_tag()){ $keywords = single_tag_title('', false); $description = tag_description(); } $keywords = trim(strip_tags($keywords)); $description = trim(strip_tags($description)); ?> &l
  • 0
    WordPress获取文章中的图片个数函数/* * 获取文章中的图片个数 if( !function_exists('get_post_images_number') ){ function get_post_images_number(){ global $post; $content = $post->post_content; preg_match_all('/<img.*?(?: |\\t|\\r|\\n)?src=[\'"]?(.+?)[\'"]?(?:(?: |\\t|\\r|\\n)+.*?)?>/sim', $content, $result, PREG_PATTERN_ORDER); return count($result[1]); }} 函数使用方法: <?php echo get_post_images_number().'张图片' ?>
  • 0
    <?php $t1=$post->post_date; $t2=date('Y-m-d H:i:s'); $diff=(strtotime($t2)-strtotime($t1))/3600; if($diff<168 && $diff>=24){ echo human_time_diff(get_the_time('U'), current_time('timestamp')) . '前'; the_time('H:i:s');} elseif ($diff<24) {echo human_time_diff(get_the_time('U'), current_time('timestamp')) . '前';} else {the_time('Y.m.d');echo ' ';the_time('H:i:s');} ?>
  • 0
    在标题处添加置顶字样 其实我们这篇文章要用到的函数也只有一个is_sticky(),这个函数用于判断该文章是否为置顶文章。置顶文章一般也只在首页显示,那现在就打开你的主题目录下的index.php,查找:the_title(); 然后将其改成: : the_title(); if( is_sticky() ) echo '&nbsp;&nbsp;<span style="color:red;">置顶</span>';
  • 0
    在标题处添加置顶字样 其实我们这篇文章要用到的函数也只有一个is_sticky(),这个函数用于判断该文章是否为置顶文章。置顶文章一般也只在首页显示,那现在就打开你的主题目录下的index.php,查找:the_title(); 然后将其改成: 代码如下: the_title(); if( is_sticky() ) echo '&nbsp;&nbsp;<span style="color:red;">置顶</span>';
  • 0
    在新建的模板加入以下代码即可解决: <?php /* Template Name: GoogleSearch */ ?> 也可以在调用header里面加入,如下: <?php /* Template Name: GoogleSearch */ get_header(); ?>
  • 0
    <table width="960" border="0" align="center"> <tr> <td>最近访问</td> <td>&nbsp;</td> </tr> <tr> <td><ul class="ds-recent-visitors" data-num-items="16" data-avatar-size="50"></ul> <!--多说js加载开始,一个页面只需要加载一次 --> <script type="text/javascript"> var duoshuoQuery = {short_name:"lilianggu2"}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async =
  • 2
    <!–以下为提交文章的动作–> <?php if( ‘POST’ == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] )) { if (isset ($_POST['title'])) { $title = $_POST['title']; } else { echo ‘Please enter a title’; } if (isset ($_POST['description'])) { $description = $_POST['description']; } else { echo ‘Please enter the content’; } $tags = $_POST['post_tags']; $post = array( ‘post_title’ => $title, ‘post_content’ => $description, ‘post_category’ => array($_POST['cat']), ‘tags_input’ => $tags, ‘post_status’ => ‘publish’, ‘
  • 1
    <?php if(isset($_GET['author_name'])) : $curauth = get_userdatabylogin($author_name); else : $curauth = get_userdata(intval($author)); endif; ?> <h3>About: <?php echo $curauth->display_name; ?></h3> <p><strong>Website:</strong> <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></p> <p><strong>Profile:</strong> <?php echo $curauth->user_description; ?></p> <h3>Posts by <?php echo $curauth->display_name; ?>:</h3> &
    XPE杰瑞 2-6
  • 1
    /*VIP评论之星*/ .vp,.vip,.vip1,.vip2,.vip3,.vip4,.vip5,.vip6,.vip7{background: url(images/vip.png) no-repeat;display: inline-block;overflow: hidden;border: none;} .vp{background-position:-515px -2px;width: 16px;height: 16px;margin-bottom: -3px;}.vp:hover{background-position:-515px -22px;width: 16px;height: 16px;margin-bottom: -3px;} .vip{background-position:-494px -3px;width: 16px;height: 14px;margin-bottom: -2px;}. vip:hover{background-position:-494px -22px;width: 16px;height: 14px;margin-bottom: -2px;} .vip1{background-position:-1px -2px;width: 46px;height: 14px;margin-bottom: -1px;} .vi
  • 0
    functions.php文件: /* 调用作者文章数量*/ function num_of_author_posts($authorID=''){ //根据作者ID获取该作者的文章数量 if ($authorID) { $author_query = new WP_Query( 'posts_per_page=-1&author='(http://www.111cn.net).$authorID ); $i=0; while ($author_query->have_posts()) : $author_query->the_post(); ++$i; endwhile; wp_reset_postdata(); return $i; } return false; }from:
  • 0
    function my_profile( $contactmethods ) { $contactmethods['weibo_sina'] = '新浪微博'; //增加 $contactmethods['weibo_tx'] = '腾讯微博'; unset($contactmethods['aim']); //删除 unset($contactmethods['yim']); unset($contactmethods['jabber']); return $contactmethods; } add_filter('user_contactmethods','my_profile');
  • 0
    Wordpress 如何显示作者文章数量和评论数量,这是通过数据库查询获得文章作者文章数量和评论数量,其代码如下: <?php global $wpdb; $author_id = $current_user->ID; $comment_count = $wpdb->get_var( $wpdb->prepare( “SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved=’1′ AND user_id = ‘$author_id’ AND comment_type not in (‘trackback’,'pingback’)” ) ); //查询作者评论数量 $post_count = $wpdb->get_var( $wpdb->prepare( “SELECT COUNT(*) FROM $wpdb->posts WHERE post_status IN (‘publish’,'sta
  • 0
    想在前台会员中心调用显示wordpress会员投搞发表的文章数量,习惯性的先谷歌搜索看看是否已存在相关的教程函数代码,如果没有函数代码则找插件,如果没有插件则再自己琢磨代码调用,很幸运找到zwwooooo发布的WordPress: 获取某作者的文章数的一篇教程,刚好满足了需要,不用再找插件或自己去研究,感谢作者! 操作方法:通过使用 WP_Query() 函数来实现,用循环获取数量。 把下面函数代码添加到当前主题的functions.php文件: /* 调用注册会员作者发表
  • 0
    <p align="right">文字</p>
  • 12
    CorelDRAW是一款非常易于掌握的绘图软件,它具有非常亲切友好的界面和丰富全面的功能。对于那些并不追求速度的初学者、中级用户和老鸟高手来说,该软件可以算得上是最好的选择了。 一、对象的选择和处理 挑选工具:最常使用的工具,利用点击或拖拽出一个选取区,可以选取一个或多个对象。 在处理屏幕上的一个对象时,用户可以用“选取”工具选择它。一旦选定,用户就可使用菜单命令或者工具来改变对像的外观或位置。 CorelDRAW提供三种技
  • 1
    本文为你介绍5款WordPress代码高亮插件。这些插件对于开发者很有用,他们经常会在博文中包含CSS、JS或其他语言的代码。通过使用以下插件,可以帮助更好地突出显示代码块。 1. CodeColorer 它有几种不同的主题可供选择。该插件的应用范围很广,适用于多种不同的语言。这篇博客用这款插件来高亮代码块。 示例: 2. WP-Syntax 该插件通过使用GeSHi提供更好的语法高亮功能,且支持大多数编程语言。 示例: 3. WP-Code 示例: 4. Crayon Syntax Highlighter 该插件支持
  • 14
    1、目前最稳定的版本是CorelDRAW 9.03简体中文版,它只有“另存文件易出错”这唯一的一个瑕疵,可以先复制文件,然后再打开复制的文件进行修改,避免另存文件;有的CorelDRAW9,文件做大了会发生错误,打不开文件,修改备份文件后缀名为“.cdr”即可打开。 2、双击矩形工具,可生成一个与页面适合的矩形。 3、设置选取工具的属性列中的“贴齐导线”、“贴齐物件”可精确调整物体的位置,设置“视为已填色”能方便选择图形。 4、设置选取工具属
  • 1
    <style> body{ font-size:12px;} #top{position:absolute;} #top a img{-moz-opacity:0.5; filter:alpha(opacity=50);border:0px;} #top a:hover{font-size:9px;} #top a:hover img{-moz-opacity:0.5; filter:alpha(opacity=80);cursor:hand;} </style> <div> <div id="top"><a href="http://www.jscode.cn" target="_blank"><img src="" /></a></div> 这里是一些文字</div>
  • 0
    1、文本标签(命令) <pre></pre> 创建预格式化文本 <h1></h1> 创建最大的标题 <h6></h6> 创建最小的标题 <b></b> 创建黑体字 <i></i> 创建斜体字 <tt></tt> 创建打字机风格的字体 <cite></cite> 创建一个引用,通常是斜体 <em></em> 加重一个单词(通常是斜体加黑体) <strong></strong> 加重一个单词(通常是斜体加黑体) <font size=?></font> 设置字体大小,从 1 到 7 <font color=?></font>
  • 0
    <?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 200,"···"); ?>
  • 0
    用 CSS 控制 超链接样式 - css 超链接 本文将讲解通过 css 样式 或通过 css 来控制超链接样式。这里主要讲文字类型的超链接,超 链接的样式包括通过 CSS 来控制设置超链接有无下划线、超链接文字颜色等样式。 什么是超链接? 超链接通俗地指从一个网页指向一个目标的连接关系 , 这个目标可以是另一个网页 , 也可以 是相同网页上的不同位置, 还可以是一个图片, 一个电子邮件地址, 一个文件, 甚至是一个 应用程序。 而在一个网页中用来超链接的
  • 0
    <img src="<?php echo catch_that_image() ?>"style="filter:Alpha(opacity=100,finishOpacity=0,style=4)" width="215px" height="200px"></a> opacity:开始处的透明度 finishOpacity:结束处的透明度 style:0,平均透明 1,线状透明 2,圆形透明 3,菱形透明
  • 1
    操作过程 1.在主题的single.php文件中添加以下代码: <div class=“postnavigation”> <span class=“left”><?php if (get_next_post()) { next_post_link(‘%link’,'&lt;’); } else { echo “<a href=’http://coolwb.com’>&lt;</a>”; }; ?></span> <span class=“right”><?php if (get_previous_post()) { previous_post_link(‘%link’,'&gt;’);} else { echo “<a href=’http://coolwb.com’>&gt;</a>”; }; ?></span></div> 2.在样式css文件中添加: /* Post navigation */ .postnavigat
  • 1
    网上一搜,真没有直接的 WordPress 函数方法,都是直接用SQL语句查询实现的,代码如下: <?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo '本站有', $users, '位注册用户'; ?> 但是直接用SQL 不爽啊,总觉得赤裸裸地……而且看这SQL获取的是所有用户。去 WordPress codex 转了一下,没发现直接的函数实现方法。 不过就在放弃直接函数方式时我注意到一个 WordPress 内置函数:wp_list_authors() 这不是列出所有作者的函数么?(wp_list_authors() 详情传送门 &
  • 0
    一、添加投稿表单 1、首先在当前主题的目录下新建一个php文件,命名为tougao-page.php,然后将page.php中的所有代码复制到tougao-page.php中; 2、删除tougao-page.php开头的所有注释,即 /* 与 */ ,以及它们之间的所有内容; 3、搜索:the_content,可以查找到类似代码<?php the_content(); ?>,将其替换成代码一 如果你在tougao-page.php中找不到the_content,那么你可以查找:get_template_part,可找到类似代码:<?php get_template_part( &apos;content&apos;, &apos;page&apos; ); ?&g
  • 0
    这也算是一个分析网站访客的小tip,显示用户登录的时间和日期。 把第一段代码复制到functions.php中。 function your_last_login($login) { global $user_ID; $user = get_userdatabylogin($login); update_usermeta($user->ID, 'last_login', current_time('mysql')); } add_action('wp_login','your_last_login'); function get_last_login($user_id) { $last_login = get_user_meta($user_id, 'last_login', true); $date_format = get_option('date_format') . ' ' . get_option('time_format'); $the_last_login = mysql2date($date_format, $last_login, false); echo $the_last_login; } 你
  • 1
    <div style="background: url('图片地址');width:120px;height:40px;padding-left:30px;padding-top:10px;"align="absmiddle">文字</div>
    WYN城邦 4-13
  • 0
    序列号是666-12345678 密码是:128B1
  • 0
    Remove Category Base
  • 0
    发日志时使用短码,例如: [taobao_imhere url='网址' desp='商品描述' price='8.86'] 这样就行了,url代表去购买的地址,price是价格,desp是商品描述
  • 0
    wordpress<?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>

  • 发贴红色标题
  • 显示红名
  • 签到六倍经验

赠送补签卡1张,获得[经验书购买权]

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!

本吧信息 查看详情>>

会员: 地球超人

目录: 个人贴吧