1 min read: 

To get rid of the technical debt, the P4 team is shipping a functionality that whenever an editor saves a tag, if a redirect page is not defined, a WordPress page gets automatically created and assigned to the #tag, keeping the same design and url of auto-generated tag pages (e.g.  /nro-name/tag/xxxxxxxxx)

When this process finishes, no tag pages will have autogenerated content any more.


4 min read: 

Back in 2018, we took some technical decisions to deliver a live working prototype as fast as possible. One of these was the auto-generation of the content of #tag pages. What a user sees when they click on a #tag.

The International #Forests tag page

With a clear design to deliver, we decided to hardcode a few blocks in the tag.php file. It worked well…. at first.

But when the editors started using blocks, they started asking for improvements and extra options on the existing, and when the P4 dev team started implementing those requests, the original choice to hard-code #Tag pages created duplication conflicts and extra requirements (generating technical debt).

The decision, a few month later, to merge some original blocks into new ones with more options and fields for the editors (and then retire those original blocks), made the problem bigger. Such new, more advanced blocks added more complexity, making the technical debt grow.

A quick overview on the functionality merge of P4 blocks

A few months ago, triggered by an idea from our Dutch colleagues asking for more flexibility on the #tag pages, the P4 team released  a different feature: A tag redirection feature. Editors can now create a regular WordPress page, and then select that page as the #Tag page in the tag admin.

Instead of showing the auto generated content, the visitors would see the content of the selected page (without a change in the url). See the .gif below.

Moving forward

To totally get rid of the technical debt, the P4 team is taking this feature a step further, a functionality that:

  • whenever an editor saves a tag, if a redirect page is not defined, a WordPress page gets automatically created and assigned to the #tag, keeping the same design and url

When this process finishes, no tag pages will have auto-generated content any more.

The newly created tag pages will:

  • have the name #tagname  (E.g. #Oceans or #Climate)
  • have the same design as the auto-generated #Tag pages. Any changes can be done though, since these will be regular pages
  • have the same url  /nro-name/tag/xxxxxxxxx
  • not have any category, parent or tag when automatically created. Editors can assign Taxonomy / page parenting anytime
  • be accessible when clicking on the assigned #Tag
  • not be crawled by search results

Questions? Comments? .gifs? Please send us an email or comment below  🚀