How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A PHP application that stores customers, patients, tenants or staff makes privacy decisions long before a lawyer reads the policy. A column is created, a log line is written, a backup runs. I am Mariusz Szatkowski, a developer in Gdynia who works remotely and in writing, and for Madrid projects I use the AEPD guide on data protection by design as the checklist for those decisions. I am not a lawyer. The controller decides the legal position, and I build what the decision requires.

Cuatro Torres Business Area, Madrid. Image: Dewel, licence CC BY-SA 4.0, via Wikimedia Commons.
The Agencia Española de Protección de Datos publishes the Guía de Privacidad desde el Diseño, a 58-page document dated October 2019. It treats the idea as a risk-based, proactive approach that covers the whole life cycle of a system, from conception to withdrawal, through development, production, operation and maintenance. Its stated aim is that data protection is present from the first phases of development and is not a layer added later.
The guide rests on the seven foundational principles of Ann Cavoukian, among them privacy as the default setting and privacy embedded in the design phase. For the default setting it lists practical points that read like a backlog for a PHP project:
Under article 25 GDPR the obligation falls on the controller, and the guide says it applies to every controller regardless of size, type of data or nature of processing. It adds that article 83 treats a failure to meet it as sanctionable. Through recital 78 and article 28 GDPR the guide extends the idea to suppliers, developers of products and applications, and device makers. The controller is expected to select products and processors that offer sufficient guarantees.
For a Madrid company that commissions custom software this has a practical meaning. The controller asks the developer how the application meets these points, and the developer should be able to answer with the schema, the code and the records, not with a promise. That is why the last strategy in the guide, demostrar, matters as much as the technical ones.
The guide takes the strategies from the Privacy Design Strategies work cited in its footnotes and groups them. Minimizar, ocultar, separar and abstraer act on the data. Informar, controlar, cumplir and demostrar act on transparency, control and proof. Each strategy has tactics, and the tactics are where a developer finds work to do.
| Strategy | Tactics in the guide | What it means in a PHP codebase |
|---|---|---|
| Minimizar | seleccionar, excluir, podar, eliminar | fewer fields, scheduled deletion, deletion that reaches backups |
| Ocultar | restringir, ofuscar, disociar, agregar | roles, hashing, encryption, unlinking tables |
| Separar | aislar, distribuir | separate schemas or databases per purpose |
| Abstraer | sumarizar, agrupar, perturbar | ranges and groups instead of exact values in reports |
| Informar | facilitar, explicar, notificar | layered notices, breach notification path |
| Controlar | consentir, alertar, elegir, actualizar, retirar | consent records, export, correction, erasure screens |
| Cumplir | definir, mantener, defender | written policy, procedures, reviews |
| Demostrar | registrar, auditar, informar | decision log, audit trail, reports to the authority |
The guide defines minimizar as collecting and processing the least data possible, either from fewer people or fewer data per person. Its four tactics are specific. Seleccionar means choosing only the relevant individuals and attributes, a whitelist. Excluir is the reverse, excluding what is irrelevant in advance. Podar means removing personal data as soon as it is no longer needed, which requires deciding the retention period for each data item in advance and automatic deletion when it expires. Eliminar means deleting completely, in a way that cannot be undone, including from backup copies.
In a PHP project I turn this into questions asked before the table exists. Does a quote request need a phone number? Does a newsletter signup need a name? Which column holds the data that expires first? A retention job is a small script that runs on a schedule:
<?php
// Retention period comes from the controller's written decision, not from the code.
$limit = (new DateTimeImmutable('-12 months'))->format('Y-m-d H:i:s');
$stmt = $pdo->prepare('DELETE FROM enquiries WHERE created_at < :limit');
$stmt->execute(['limit' => $limit]);The twelve months above are an example. The guide also describes a softer form of podar: when a record holds other information that must stay, the unneeded fields can be reset to a default value. That is an UPDATE instead of a DELETE, and it suits an order that must remain for accounting while the delivery contact can go.
The backup clause in eliminar is the one projects forget. If deleted rows survive in a nightly dump for a year, the deletion is partial. The fix is a decision, not a script: how long dumps are kept, who can restore them, and how a restore re-applies deletions. I write that into the runbook for the controller to approve.
Ocultar limits exposure. The guide names restringir, an access policy based on need to know in space (which data) and in time (which processing stage), and ofuscar, making data unintelligible to unauthorised people with encryption and hashing in storage and transmission. Disociar removes the link between data sets that must stay independent, with special attention to metadata, and agregar groups information about several people to avoid correlations.
For PHP this gives three habits:
password_hash() with PASSWORD_DEFAULT. The manual says the constant is designed to change over time as stronger algorithms arrive, so the result length can change, and it recommends a column that can grow beyond 60 bytes, with 255 as a good choice. It also says not to supply a salt, because PHP creates a secure one.hash_hmac(). The function takes an algorithm such as sha256, the data and a secret key, and returns a hex string. Keep the key outside the database that holds the hashes.<?php
// The analytics table stores this value, never the address itself.
function pseudonym(string $email, string $key): string
{
return hash_hmac('sha256', strtolower(trim($email)), $key);
}Whoever holds the key can recompute the value from a known address, so the result is pseudonymised data and the key becomes a secret with its own access rules. The guide separates this from anonymisation and mentions k-anonymity as a technique for anonymised data. Abstraer goes the other way: sumarizar replaces exact values with ranges, agrupar replaces individuals with categories, perturbar uses approximate values. A dashboard that shows age bands and monthly counts is cheaper to defend than one that lists people. The guide warns that even aggregated data carry some risk when a person can be placed in a small group, so a band with two members is not abstraction.
Separar aims to stop one entity from building a complete profile out of data collected for independent purposes. The tactics are aislar, storing data in logically independent databases or applications, and distribuir, spreading processing over units that are physically independent. In a Symfony or Laravel monolith the cheap version is separate schemas or database users per purpose, so that the marketing module cannot query the support tickets table. Where two sources must be joined, the guide suggests scheduled deletion of the indexing tables that link them.
Informar is transparency in time and form. The guide points to layered notices: a short first layer at the moment and place of collection, with detailed information on a second layer. It also lists notification of the data subject when data come from elsewhere, within a month at the latest, and notification of breaches that pose a high risk. Controlar covers the rights of access, rectification, erasure, objection, portability and restriction, plus giving and withdrawing consent. The guide says withdrawing consent must be as easy as giving it, and that basic functionality should not depend on consent to processing that is not needed for it.
These are screens and endpoints. An account page with export and delete actions, a consent record with timestamp and wording version, a path from a breach report to the people affected. The guide says these features should be considered from the design of the application, so they are in the first sprint, not after launch.
Demostrar is the accountability strategy based on article 24 GDPR: the controller can show data subjects and authorities that the policy and the legal duties are met. The tactics are registrar, documenting each decision over time, including contradictory ones, with who took it, when and why; auditar, systematic and documented review; and informar, documenting audit results and incidents and making them available to the authority.
In a project this becomes a short decision log in the repository: why this field exists, why this retention period, who may export, which processor receives which data. Each entry has a date and a name. When the controller writes an Article 28 processor agreement, the log is the technical annex it can point to. The guide also notes that a data protection impact assessment, where required, and the documented decisions are part of the design of any new processing.
password_hash(), and pseudonymise identifiers that only need matching.Development stays with me and is not handed to subcontractors. Broader PHP work is described under PHP developer.
If your Madrid team runs a PHP application with personal data, describe it through the contact form: the stack, where the data live, which processors touch them and the date you need an answer. The first written estimate costs nothing, and it names the schema and job changes the AEPD strategies would call for. The legal reading stays with you and your adviser.
Examples of my work.
Ilovehair.pl is an e-commerce store based on the WordPress platform, dedicated to the sale of professional hairdressing products by Hair Saloon Products. As ...
jpg.pl is an advanced hosting platform designed for secure storage, management, and distribution of images. The service is aimed at both individual users and...
kochamruch.pl is a website for a community focused on movement and physical activity, with content publishing and stable technical foundations.
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.