How to add Categories and Tags to wp Pages

Historically, categories and tags have always been associated only with wp publications; they are one of the pillars of the classification and search of information in wp, and normally this approach is more than enough for most websites. However, when talking about medium and large size websites, the lack of this technique applied to standard wp pages is not a good scenario.

line markers

The pages, habitually static information not subject to a date (unlike posts), hardly ever need to be classified or searched… they have mostly been accessed through menus but what can we do if we need to add Categories, Tags or even custom taxonomies to Pages? Continue reading…

Creating a Table of Contents for your Pages

WordPress has got the hability to work with nuclear posts and also with posts that can contain other posts, ie, posts with hierarchical structure, the pages. Today we’re going to see how to create a hierarchical list of the second ones, as an index of pages, Table of contents (TOC), etc.

Panzerbaum

As default, WordPress supports two different kinds of elements: posts and pages. The basic difference between them is that the first ones are treated as individual elements and thus, when WordPress displays a collection of them, this will be just a long linear list of elements (like the natural numbers 1, 2, 3, 4, for example) meanwhile the second ones have got a hierachical structure, ie, each element can contain (to point to) elements that have also got hierarchical structure and can contain (to point to) other elements and so on, in consequence, when WordPress displays a collection of them, it should be always presented as a tree and never as a list. Continue reading…

How to detect when get_template_part() WordPress function fails

Nowadays, in most of modern WordPress themes, the function get_template_part() is one of their essential elements. It just takes review the structure of, for example the last official themes (…, Fourteen, Fifteen, Sixteen), to realize that WordPress themes have evolved, from a structure quite monolitic to a structure driven by content and formats. And one of the keys to this evolution is the get_template_part () function.

silent diversity

get_template_part() it’s actually an invaluable element of any modern WordPress theme that through its two parameters allows us to select dynamically what .php file (what part) is going to be loaded for displaying the current page (see the official documentation for further information) however, one of its characteristics is that Continue reading…

Constructing WP themes or plugins that take into account future gender translations

Actually, there is not a simple solution for avoid the gender issue if you are translating a WP theme or plugin to languages that take into account the gender for selecting the words of a sentence. Simple, try to substitute the gendered words or expression for others that feet into the sentence without too many problems… But if you are not translating but creating a new theme or plugin you can use a simple set of techniques –better maybe suggestions–, that will allow future translators for dealing to this kind of problems with better results. Let’s go to see three simple proposals.

Rest area

But, before to go to the solution, let me show you a tiny example of this kind of gender issues. Continue reading…

Modifying the HTML <title> tag in a WordPress Site

As default, WordPress automaticaly generates quite good HTML <title> tags for the different pages of a website. These HTML <title> tags usually fit well with the content of the page and for us, the human beings, these tags are more than enough for understanding. On the other hand, these HTML <title> tags (hereinafter simply, titles) are also interpreted for the programmes: the browsers just show these titles but web crawlers engines use titles for understanding the global meaning of the content and, depending on them, the pages are classified and included (or not) in the results of a search and this last it’s very important if we are talking about SEO. Good title, good SEO. Poor title… well, you know. So the most probably is that you want to improve a litle bit your HTML <title> Tag. Do you want?

Modifying the html ‘title’ tag

Time ago, for modifying the titles WordPress only offers one posibility, to filter the output of the function wp_title however, since version 4.1, WordPress also offers another possibility, Continue reading…