Effective SEO & Web Studio
SEO friendly titles in Textpattern

SEO friendly titles in Textpattern

Jan 27, 02:34 PM in Content Management Systems

Today almost all CMS have some SEO features that make sites powered by them easier to find in search engines. SEO is important because without it millions of sites remain nice-looking business cards lost on the Internet. Therefore to create a SEO friendly site one has to choose a SEO friendly CMS to power that site with.

Textpatern is a very flexible CMS that allows for easy adjustment of some SEO features. One of the key factors that affect site’s ranking in Google, Bing, Yahoo, etc. is a proper title between tags


Default version of Textpattern has the following order: SITETITLESECTIONTITLE, if a section page is open. And SITETITLEINDIVIDUALARTICLETITLE when an individual page is open. An individual page title between <title></title> is the same as an article header usually put between <h1></h1>.

If one has a bunch of article categories and wants their titles to be seen between <title></title>, there is a way to do it. By the way, from the SEO point of view it is better for each page to have its unique title.

For example, if you have section my articles and this section has a lots of categories like category 1, category 2, etc. in default Textpattern version when a category 1 or category 2 page is open their titles will not show between <title> </title>. To improve SEO parameters we can add CATEGORYTITLE to default <span class="caps">SITE</span><span class="caps">TITLE</span> – <span class="caps">SECTION</span><span class="caps">TITLE</span> by installing TXP plug-in ob1_title by Henrik Jönsson, an enhancement for txp:page_title with more features. Replace the default TXP title with this:

<title><txp:ob1_title order="article, category, sitename" separator=" :: " /></title>

The plug-in allows for the following order – Article Title :: Category title (Another category can be added if an article is placed in two categories) Section title :: Site title. Needless to say, the titles can go in reverse order if one wishes.

The best SEO approach toward titles is to enable each page to have its own unique title without Site Title and Section Title repetition. It is also helpful when one can modify a page title by adding extra key words to it. Is it possible?

Yes, it is. This can be solved by Textpattern custom field that should be created in the Admin Panel – Prefernce – Advanced. Lets’s name our custom field “SEOtitle”, then replace default TXP title with the following code:

<txp:if_individual_article> <title><txp:custom_field name="SEOtitle" default="Your default title " /></title> <txp:else /> <title><txp:article_custom form="SEOtitle" id="1" pgonly="0" /></title> </txp:if_individual_article>

From this point on each individual page will have its unique title that can be modified in Custom Field “SEOtitle” in the article form.

If one does not put anything in the custom field the title will be whatever one puts instead of “Your default title” in the second line. All section and category pages will bear the title of the article # 1 in our case. Needless to say, it is possible to change the article id.

A wonderful Textpattern plug-in rah_output_section_form allows for naming sections and categories. Thus, this combination of SEO plug-ins makes textpatterned sites extremely SEO-friendly, which is the very goal SEO tries to achieve.