May 11 2011

WordPress Tag Cloud

Category: InternetTeknovis @ 22:34

I updated my version of WordPress tonight. Unfortunately, each time I do this the size of my tag cloud is reset to 45 :( The instructions outlined in WordPress Categories and Tags no longer work. However, the instructions outlined in How To Customize The WordPress Tag Cloud work perfectly!

I am sure I will need to reference this page many times in the future!

Tags:


Nov 12 2008

WordPress Categories and Tags

Category: SoftwareTeknovis @ 20:56

There seems to be differing opinions on how Categories and Tags should be used within WordPress. So now that I some experience with both of these I have decided to go with the following principles:

  • I am using Categories as very high-level descriptors, like chapters in a book.
  • I am using Tags as precise pointers, like the index in a book.

Consequently, the number of Tags is likely to grow very large, and it is likely that a substantial number of these Tags will only be used once. So I will keep this under review.

The Tag Cloud shows a maximum of 45 Tags by default, as described in the wp_tag_cloud() documentation. However, this can easily be increased to any maximum number using a parameter.

I had expected that I could parametrise wp_tag_cloud() as part of my theme, but I could not find any way to do this!

Instead I had to modify one of the WordPress PHP files. There appeared to be two approaches:

I am not sure what the relative advantages and disadvantages of these approaches are, but I chose the second one.

Tags: ,


Nov 12 2008

Fun with htaccess

Category: SoftwareTeknovis @ 17:50

I have now started using pretty URLs for my permalinks. This took me a long time to get working, but I have to admit that this was my own fault :o

Configuring permalinks within WordPress is straight-forward, and it is described in Using Permalinks.

My problems occurred because WordPress could not create the required .htaccess file due to the way that Blacknight has installed WordPress in a different directory to the one that appears in the URL.

In trying to solve my problems, I learned a lot about .htaccess files! I thought that these Stupid htaccess Tricks were very useful.

Everything appears to be working perfectly now, but there is still one thing that I do not understand. My .htaccess file contains the following three lines:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

There are many pages, such as htaccess rewrite code explanation, that describe these three lines. It is the explanation for the third line that confuses me:

Rewrites any request with 1 or more characters to /index.php, which launches wordpress and handles all redirections and what to display.

Firstly, the RewriteRule documentation states that the matched pattern is replaced with the substitution string. Furthermore, the Regular Expression documentation states that the period will match any single character! So what exactly is happening here?

Secondly, how does it rewrite the request to /index.php? Is it appended to the URL, or is it sent as a POST variable?

Tags: , , ,


Oct 30 2008

WordPress Categories and Link Categories

Category: SoftwareTeknovis @ 23:38

I have just noticed that one of my WordPress “Link Categories” has simultaneously become a post “Category”. So if I edit it on one of these two pages the change immediately appears on the other!

Strange! I do not understand why this is occuring!

Tags:


Oct 26 2008

WordPress Links in a Page

Category: SoftwareTeknovis @ 18:50

My blog has been online for one week now, and I am still making small changes to its design. Today I added my links page. Although it is rather sparse at the moment, I want to ensure that all of the links within it are links that I really read!

The process of adding this links page turned out to be far more complicated than I was expecting! I also learned a lot about how WordPress works along the way!

I initially decided that I wanted to keep all my links in a single dedicated page, rather than having them on every page. The simple solution would have been to hardcode this page, and maintain it manually.

However, WordPress has a built-in feature for managing links, so I thought that it would make more sense to use that.

I started by looking at Powerblogroll, because I thought that this would enable me to paste a line of code into my page, and everything else would work smoothly. It does not :(

So I discovered that I needed to create a links template, and then use this to create my links page. I think that the online WordPress documentation is very good, and I discovered that the wp_list_bookmarks() function was the one that I needed. The documentation describes its usage. Lastly, I updated my theme to style the new code.

Tags: ,


Oct 23 2008

YouTube in WordPress

Category: SoftwareTeknovis @ 23:03

I have just included a YouTube video in my previous post. I really thought that this would have been a simple task in WordPress, but I was quite disappointed!

The first hurdle was actually figuring out how to paste the HTML code that YouTube supply. This was not too difficult – I just had to switch to the HTML view in WordPress.

The second hurdle appeared when I tried to validate my post. I had not realised it, but the <embed> tag is not supported in XHTML! So I modified the YouTube code as described here.

I really do not understand why YouTube are using this deprecated tag!

Tags: , , ,


Oct 19 2008

Why WordPress?

Category: SoftwareTeknovis @ 20:40

I think that it is appropriate that my very first post in this blog should explain some of the reasoning and choices that were made in getting to this point.

The first decision that I had to make when I decided to start this blog was where I would host it. There are many guides online giving the advantages and disadvantages of various options, but for me this was a fairly simple decision. I decided to host it with my current hosting service provider Blacknight, because I like having complete control over it.

The second choice was to decide which bloging software to use. Blacknight offers three possibilities:

I did not have any previous direct experience with any of these, but I understood Drupal to be more of a CMS, so I immediately eliminated it. Initially I was leaning towards Movable Type because it seems to be favoured by Blacknight. Apparently it is significantly less resource intensive than WordPress due to its use of page caching.

I then started reading some of the many articles online that compare Movable Type and WordPress, and in the end I decided to go with WordPress. The main advantages of WordPress to me are:

  • WordPress is open source, whereas only some versions of Movable Type are open source. Therefore, I expect that there will be more plugins and themes available for WordPress.
  • WordPress seems to be more popular.
  • WordPress appeared to be easier, and more intuitive, to use. This is important to me, because I wanted to start blogging fairly quickly!
  • The WordPress implementation seems to be cleaner, since it uses only one programming language (PHP). Movable Type apparently uses a mix of Perl and PHP. I am not a fan of applications written using several similar programming languages!

There are also many advantages of Movable Type, but since these are not relevant to me I have not covered them here.

So now we are here! I will keep this blog updated with my opinions and experiences of WordPress. I also will cover plugins and accessibility in future posts. Now I think that this is enough for my first post!

Tags: , , , , , ,