2 Skills about WordPress

Here let me show 2 skills on how to use wordpress well. 1. show all sub-categories at its parent category page; 2. get rid of “no categories” if a category does not have sub-category. For the first, there are 2 method, one does not show sub-category is the sub-category deos not have post: <?php $this_cat […]

How to show a certain post at homepage?

Sometimes we need to show the short description of new post from certain category, say, we want to show the latest post description from category is 29, and only show at homepage only, how to do then? Here are the code for you, you can add them at proper place, say header.php: Here “if (is_home()) […]

How to not Show WordPress Posts under Certain Category at Homepage?

Sometimes we do not like to show wordpress posts under certain category or categories at homepage? Here are some methods. For example, you do not need to show post under category 29. First method, placing this code in index.php file will cause the home page to display posts from all categories except category ID 29.

How to Import WordPress eXtended RSS (WXR ) Big Files?

We often to import post to wordpress via the tool of Import WordPress, if we import big files, we always meet errors. How to resove this issure then? Let me share a skill with you. Use 7-zip to GZIP your exported file, usually a 30 MB file down to just about 3 MB. Then try […]

Useful Skills for WordPress

First, let me share 3 useful wordpress plugin, WP htaccess Control, WP No Category Base, WP No Tags Base. We can use WP No Category Base,WP No Tags Base at the same time. If you do not need wordress parent category name, just active WP No Category Base; same, if you do not like parent […]

How to display wordpress post titles from a single category?

There 2 siturations, first one, we only need to show certain category post, say category id 3. If the category id is 3, then the blog will show some posts under the category. We can use the following code: <?php if ( is_category(‘3’) ) : ?> <li> <h2>News</h2> <ul> <?php $posts = get_posts(‘numberposts=10&category=3&orderby=post_title&order=ASC’); foreach($posts as […]

How can I change wordpress 404 page with Hostgator?

First, creat a page called 404.php, and put the file under your theme root. For example, you are using the wordpress theme called twentyten, then please put 404.php under wp-content/themes/twentyten. Add the following code at 404.php:

Show Category and Tag Descriptions In WordPress Theme

1. Show Category Descriptions go to your theme category, and open Category Template (category.php), find: < ?php get_header(); ?> < ?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> < ?php if (is_category()) { ?> Archive for the “< ?php echo single_cat_title(); ?>” Category under the code add: < ?php echo […]

Change WordPress Classic H1 Font Size

Sometimes we feel WordPress Classic H1 font size is too big. How to decrease the font size then? Login wordress admin panel, go to -> Appearance ->Editor ->Stylesheet (style.css) Modify: #header {  background: #90a090;  border-bottom: 3px double #aba;  border-left: 1px solid #9a9;  border-right: 1px solid #565;  border-top: 1px solid #9a9;  font: italic normal 230% ‘Times New Roman’, […]