Posts Tagged ‘WordPress’

WordPress: How To Show Category Post Counts

WordPress does not show post counts by default. You need to change it if it’s your desire to do so. Simply log in to your dashboard and click on the down arrow of the “Appearance” option. You will see “Widgets” there. Click on it and when the page opens you will be presented with three options:

1. Show as dropdown
2. Show post counts
3. Show hierarchy

Check the “Show post counts” option and click on “Save.” Close the widget and your blog will now show the total number of posts within each category.

WordPress: How To Show Categories As A Hierarchy

By default WordPress puts all category links in alphabetical order. For some blogs this isn’t a problem and many people just leave it like that. But if you have strongly related categories that would be better as sub-categories of a category then you need to change it.

So, how do you change Wordpress categories to show a hierarchy? When I first wanted to change one of my blogs to this setting I expected to find it in settings somewhere. It isn’t there of course – that would be too easy. What you need to do once you are logged in to your dashboeard is click on the “Widgets” link – it’s there under “Appearance.” Once the page has opened up find the sidebar in which your categories widget is located and click on the down arrow. The widget will open up and you will see 3 options:

1. Show as dropdown
2. Show post counts
3. Show hierarchy

Check the “Show hierarchy” option and click on “Save.” Close the widget and you are good to go.

How To Remove “WordPress.org” from The Meta Widget

Personally I don’t wish to have a link to WordPress.org in the sidebar “Meta” widget so if you’re like me you will want to remove it and that means going into the files that come with WordPress – it can’t be done through the admin panel.

You will need to look in the “wp-includes” folder and find a file named “default-widgets.php.” Open it up in the editor of your choice and locate the following line…

<li><a href=”http://wordpress.org/” title=”<?php echo esc_attr(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>

…and then delete it. Save the file and then upload it to your website and the WordPress link will be gone.

WordPress Error: The uploaded file could not be moved to…

One of the things that never ceases to amaze me is how I can have two different WordPress blogs with the same versions of everything on each and yet I get an error message on one and not on the other. This particular error message cropped up when I tried uploading an image through the flash uploader.

The uploaded file could not be moved to /home/username/public_html/blog/wp-content/uploads/

Having first checked that I had an uploads folder and that permissions were set to allow writing I opened the folder with my FTP client and checked that WordPress had been able to create the image folders. It had and these too were set with the correct permissions.

After a bit of research online I tried several suggested fixes but none of them worked. So, after a little bit of tinkering I found something that did. The following code needs to be added to your htaccess file:

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

Now, two things. Firstly the htaccess file needs to be wherever the WordPress root is. The website I had the error on had the blog at second level so this was where the htaccess file was needed. Secondly this code needs to be put above the standard WordPress code – the fix did not work when it was added below the existing code. So you should end up with something like this:

# BEGIN WordPress
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

# END WordPress

Bookmark Or share
AddThis Social Bookmark Button