Category Archives: Happiness

Blogging is a great way to grow a business

Blogging is a great way to grow a business, promote a cause, or spread new ideas, because when you take an educational approach to marketing, you gain the attention and trust of people who might otherwise simply ignore old-fashioned advertising. Not only can those people become your customers or converts, they can also become your [...]

Send it around to a few

I’ve gain good credibility, even a popular local magazine just reviewed my site. but the problem is, in my country there’s just not many people that’s interested or even know about SEO. any suggestions? Building Your Fan Club The Best of Copyblogger (According to Time Magazine’s Person of the Year) The Real Secret to Getting [...]

文章中的质疑

OK,今天就继续《告诉你如何做一个CMS型WORDPRESS主题》系列的文章吧。上次我们讲了,如何让文章像你想要的方式显示的初级篇。一般情况下,上面的文章的介绍已经可以满足你的要求了。但我们可能需要更不同的效果,这就是今天我们要说的,进阶篇,主要有下面两点: 用1个以上的循环调用不重复的文章 可能导致分页出问题的代码 利用CSS+插件让首页文章像想要的方式显示 用1个以上的循环调用不重复的文章 <?php $my_query = new WP_Query('showposts=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> // 第一篇文章,或者前几篇文章,需要设置showposts=1的值,1是文章数量 <?php endwhile; ?> // 通常这里放AD 比如728×90的GGAD <?php if (have_posts()) : while (have_posts()) : the_post(); if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?> // 后续的文章放这里,比如你在后台设置了10篇,上面显示1篇,那么这里将显示9篇 <?php endwhile; endif; ?> 值得注意的是上面的$do_not_duplicate,这个变量使得文章不会重复显示,在上一篇文章中,我们已经标示,让大家注意,我自己也没有看过WP程序的完整内容,所以,也不知道,但这里还是提出来,引起大家的注意。 另外,我觉得最重要的是,这段代码可以根据后台的设置来显示,而不是在代码中定义。这样无论是做一个免费主题,还是自用的主题,都是非常重要的,因为不需要修改代码,就可以作更改,这也是我们想要的。并且,他不会出现下面我们要讨论的问题--不能分页! 可能导致分页出问题的代码 之前,在Jinwen的讲的CUSTOM FIELD文章中,遇到其提供的代码,可以让文章显示不同的样式。但,首页却不能分页。这是非常麻烦的事,至少我自己不能容忍这样的情况出现。不过,如果用上面的代码,完全可以不用担心这样的事情发生。所以,提到这个,更多的是希望,找出多种解决方法,让大家有所选择。 我这里就不多讲了,同样是Jinwen这个可爱的家伙,又写了一篇文章,专门解决这个问题,大家请看《我的WordPress主题这样做(3)-文章质疑应用》这里有详细的介绍。 BTW:这里,不得不再啰嗦一下,推荐这个WP [...]

Parse error: syntax error, unexpected ';' in /srv/www/sofish.de/public_html/en/wp-content/themes/Anjing_sofished/footer.php on line 7