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().
Every application that stores accounts, orders or messages ends up with a person asking what it holds on them, or asking for it to go. Handled in code from the start, that is a small module. Handled by hand from a database console, it is a risk with a deadline. I write this as Mariusz Szatkowski, a freelance PHP developer in Gdynia who works only remotely. I am not a lawyer: the legal position is for you and your adviser, and I build the path that the regulation and the Romanian authority describe.

Victory Square and the Opera in Timișoara, photographed by Chainwit. in 2023 and published under CC BY 4.0 on Wikimedia Commons.
The supervisory authority is the Autoritatea Națională de Supraveghere a Prelucrării Datelor cu Caracter Personal, ANSPDCP, at the address dataprotection.ro. Its Q&A guide on the application of Regulation (EU) 2016/679 lists the rights of the data subject: information (Articles 13 and 14), access (15), rectification (16), erasure (17), restriction (18), portability (20), objection (21), not being subject to a purely automated decision (22), and the right to lodge a complaint (77).
The guide says the rights in Articles 15 to 22 are exercised by sending a request to the controller. The authority is not the first stop. Before filing a complaint, a person can use these rights, and Article 12(3) sets the clock for the controller’s answer. For a PHP application, “the controller” is usually your company, and the application is the place where the request has to be received, tracked and answered.
Article 12(3) of the GDPR, which I read in the text published by the Publications Office of the EU, says the controller provides information on the action taken without undue delay and in any event within one month of receipt of the request. The period can be extended by two further months where necessary, taking into account the complexity and number of the requests. The controller informs the data subject of the extension within one month of receipt, together with the reasons for the delay. ANSPDCP repeats this in its Q&A guide.
Two related duties come with it:
The application needs a received date on every request and a due date that the system tracks. The calendar rule for “one month” is a legal question. There is also a code trap. The php.net page for DateTime::modify has an example headed “Beware when adding or subtracting months”: adding a month to 31 December gives 31 January, and one more month gives 3 March. I ran the same on 31 January 2026 in PHP 8.4, and +1 month returned 3 March, while last day of next month returned 28 February. Which of the two your adviser accepts as the end of the period is for the adviser to say. The code then implements exactly that.
Article 12(2) says the controller facilitates the exercise of the rights, and Article 12(1) says information is given in a concise, transparent, intelligible and easily accessible form, in clear and plain language. It also allows an oral answer when the data subject asks for it and the identity is proven by other means.
In an application this suggests a short in-account form for logged-in users and a monitored address for everyone else, both writing to the same request table. A request that arrives by email is entered by hand with its original date of receipt. The requester is not sent to another channel.
The table holds at least:
The reason for keeping this record is Article 12(5): if a controller refuses a manifestly unfounded or excessive request, or charges a fee, it bears the burden of demonstrating that character. Without a log, that burden is hard to carry.
Article 12(6) lets a controller with reasonable doubts concerning the identity of the person making a request under Articles 15 to 21 ask for additional information necessary to confirm it. A request from the verified email address of a logged-in account carries less doubt than one from an unknown address asking for a customer’s order history. Article 11(2), referenced in Article 12(2), covers the case where the controller cannot identify the data subject, and I did not read beyond Article 12 on that point.
The practical rule for the build is to ask for the least that settles the doubt, and to record what was asked. An email confirmation link to the address held on file is one option, and a copy of an identity document is a heavier one. Which is proportionate for your data is a decision for your adviser. In code, the identity state is a field on the request, and the clock is not paused by the system on its own: whether and when a pause applies is not something Article 12 spells out, so I do not build one without your adviser’s instruction.
Article 15(1) gives the data subject the right to confirmation as to whether personal data concerning them are being processed, and where they are, access to the data and the following information:
Article 15(2) adds the appropriate safeguards where data go to a third country. Article 15(3) says the controller provides a copy of the data undergoing processing, and where the request is electronic, in a commonly used electronic form unless the person asks otherwise. Further copies can carry a reasonable fee based on administrative costs. Article 15(4) says the right to a copy shall not adversely affect the rights and freedoms of others.
For a PHP system the hard part is not the format. It is knowing where the data lives. A useful design gives every module that stores personal data a small interface, so that the export is assembled from registered sources instead of from a hunt through tables:
<?php
declare(strict_types=1);
interface PersonalDataSource
{
/** Short name shown in the response, for example "orders". */
public function name(): string;
/** All records about the subject, as arrays ready for JSON. */
public function export(string $subjectId): array;
/** Erases or anonymises the records, and says what was kept and why. */
public function erase(string $subjectId): ErasureOutcome;
}
final class ErasureOutcome
{
public function __construct(
public readonly int $removed,
public readonly int $kept,
public readonly string $reasonKept = '',
) {
}
}The export collects export() from every registered source and writes JSON, which is a commonly used electronic form. A new module that stores personal data without registering a source is caught in code review, and a test can list the tables with personal columns against the registered sources. The purposes, recipients, retention and source information in Article 15(1) come from your records of processing and your privacy notice, not from the database, so the response template takes them from one maintained document.
ANSPDCP’s Q&A guide sets out the situations for erasure, and Article 17(1) of the GDPR is the text behind them. The controller has to erase without undue delay where one of these applies:
Article 17(2) adds a duty for data made public: the controller takes reasonable steps, including technical ones and considering available technology and cost, to inform other controllers processing the data that the person asked for erasure of links to, copies or replications of it.
Article 17(3) says paragraphs 1 and 2 do not apply to the extent processing is necessary for:
ANSPDCP lists the same exceptions in its guide. The words “to the extent” matter for the build. The exception covers the data that is necessary for the retention purpose, not the whole account. A customer who asks for erasure after an order may leave a record that the controller has to keep under a legal obligation. The marketing profile, the saved addresses and the support chat history may still have to go. The ErasureOutcome above has a kept count and a reasonKept field for this: the answer to the requester names what was kept and the reason, and the decision about the reason stays with your adviser.
The regulation says erasure and does not describe a database operation. The technical decisions that follow are yours to make with an adviser, and they are worth settling before the first request:
Run erasure in a queue with an outcome per source, and write the result to the request record. A failed source keeps the request open and visible instead of marking it done.
The failures come from process, and the documents above explain each:
I need read access to the schema and the code, and the names of the external systems that hold personal data. The general PHP work I do is described on the PHP developer page.
If your Timișoara team runs a PHP application that holds customer or user data and has no tested path for these requests, describe it through the contact form. The first written estimate for building that path is free, and the points that belong to your adviser are marked in it.
Examples of my work.
Andrzej Karałow is a talented pianist and composer whose artistic journey began in 2010 when he graduated from the Karol Szymanowski Music School in Warsaw u...
exco.pl is a professional website in my WordPress developer portfolio, created as a platform for outsourcing and consulting services for businesses. This modern project stands out for its elegant design, multilingual support, and advanced content management features.
Floresy is a leading manufacturer, wholesaler and retailer of artificial plants, flowers and trees with over 25 years of experience in creating the finest silk plants on the market.
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.