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 Belgian customer who types an enterprise number into a PHP form expects the form to know the company. Getting from the number to a name, an address and a status is a small feature with several traps. I am Mariusz Szatkowski, a PHP developer on the Baltic coast, and company data is a regular part of that work. This page covers what the Crossroads Bank for Enterprises (KBO in Dutch, BCE in French) publishes for applications, and how a custom PHP system should handle it. I am not a lawyer, and nothing here is legal advice.

Grote Markt in Antwerp with the spire of the Cathedral of Our Lady, a panoramio photograph by Sergey Ashmarin under CC BY-SA 3.0 on Wikimedia Commons.
KBO Public Search, run by FPS Economy, shows the public data of all entities registered in the Crossroads Bank for Enterprises, including their establishment units. It lists them whatever their state: active, published or stopped. You can search by number, name, activity, authorisation or address, on the public search site.
Three notes from the page matter for a developer:
A person can read this site. An application needs one of the other two routes below.
The CBE open data site, kbopub.economie.fgov.be/kbo-open-data, says it gives access to two things.
Both sit behind a login and a sign-up form. Details such as file layout, refresh schedule and licence terms are described on FPS Economy pages that sit behind a human-verification step, which I did not try to bypass. The documentation you receive at sign-up is the authority for those points.
The choice follows the use case:
Whether scraping the public search pages is acceptable is not answered by the pages I could read. The sources describe the files and the web services as the routes for applications, and that is the route a client contract should name.
The public search shows numbers in the form 0403.227.515. A test on 4 December 2026 showed how the search form treats input:
The invalid-number answer implies a check on the last two digits. The pages that could be read do not publish the rule. The calculation below, 97 minus the first eight digits modulo 97, matched three numbers that the public search returned as real entities, so I use it in a first-pass validator and I mark it as an observation, not a quotation from a specification. Anything that passes still needs a lookup against the register.
<?php
declare(strict_types=1);
function normalizeEnterpriseNumber(string $input): ?string
{
$digits = preg_replace('/^BE/i', '', trim($input));
$digits = preg_replace('/\D+/', '', (string) $digits);
if (strlen($digits) === 9) {
$digits = '0' . $digits;
}
return strlen($digits) === 10 ? $digits : null;
}
function hasPlausibleCheckDigits(string $digits): bool
{
$base = (int) substr($digits, 0, 8);
$check = (int) substr($digits, 8, 2);
return 97 - ($base % 97) === $check;
}
function displayEnterpriseNumber(string $digits): string
{
return substr($digits, 0, 4) . '.' . substr($digits, 4, 3) . '.' . substr($digits, 7, 3);
}Store the ten digits as a string, never as an integer column, so the leading zero survives. Show the dotted form to users. Reject with a helpful message when the check fails, and say the number may be mistyped, not that the company does not exist.
The register changes for reasons that have nothing to do with the company’s own filings. The public search news page lists several, and each one is a rule for an importer.
Addresses change by themselves. On 2 December 2024 and 1 January 2025, two Walloon and 28 Flemish municipalities merged. The register adjusts the seat addresses of legal persons, establishment units and branches automatically, based on the authentic address source, when the current address matches an address in that source. The entities do not have to act. An address you copied in October can be wrong in January with no event on your side.
Codes are retired and replaced. The news page records authorisations and skills that were discontinued, new capacities added for tax and postal rules, and replaced professional-body codes. Never hard-code a list of authorisation or capacity codes as a PHP enum. Keep a code table that you refresh with the data, with a flag for codes no longer in use.
Fields disappear. Since 1 January 2024, cooperative companies of the former CVBA type have no capital in the register. For those active on that date the capital was set to 0 and is no longer visible in the KBO applications. A schema that requires a capital figure for every company would break on them.
Functions can be struck ex officio. Under Article III.40 of the Code of Economic Law, the KBO management service can strike functions and entrepreneurial skills administratively. The entry then carries the note “ambtshalve doorgehaald sinds”, and where applicable the strike is published in the Belgian Official Gazette. The strike does not release the entity from its formalities. Store the date and the flag.
The new NACE-BEL nomenclature took effect on 1 January 2025. According to the public search news, all activities registered with a 2008 code were converted automatically, activity group by activity group, through a conversion table. Some 2008 codes have several 2025 equivalents in that table. In such cases the automatic conversion entered only one 2025 code. As a result, the activities of an entity or establishment unit may be incorrect or incomplete, and the register asks entities to correct and complete them. FPS Economy publishes the 2025 nomenclature with five and seven digits and the 2008 to 2025 conversion table on its code tables page.
For a PHP application the consequences are practical:
A compact model that survives the changes above:
enterprise_number as a ten-character string, unique.status and status_checked_at.name, legal_form, seat_address as received, plus source and received_at.activities as rows with code, nomenclature_version and flag_unreliable.last_seen_in_open_data as a date.The last field answers a question the files alone cannot. The files contain active entities only. A number that was in last month’s file and is missing from this month’s file might be stopped, might be a changed number or might be a transfer problem. The public search shows entities of every status, so a single lookup on the public search or through the web services settles the case. Mark such rows as “not in active file” and check them, instead of deleting them.
A small import loop, assuming a CSV file with a header row. The file format is not stated on the pages I could read, so confirm it after sign-up and adjust the parser.
<?php
declare(strict_types=1);
function readRows(string $path): Generator
{
$file = new SplFileObject($path, 'r');
$file->setFlags(SplFileObject::READ_CSV | SplFileObject::SKIP_EMPTY | SplFileObject::READ_AHEAD);
$header = null;
foreach ($file as $row) {
if ($header === null) {
$header = $row;
continue;
}
yield array_combine($header, $row);
}
}Process the generator in batches inside a transaction, and run the whole import on staging first. Measure memory use on staging with a real file before the first production run.
I work remotely from Gdynia, in the same time zone as Antwerp. Questions and answers stay in writing, so the field list is agreed before any import runs. At handover you keep the repository, the import scripts and the runbook that says what to do when the register changes a rule.
If your Antwerp business needs a lookup, an import or a clean-up of Belgian company data in a PHP system, send the data fields you rely on through the contact page. The first written estimate is free and begins with where the company number enters your system. Other PHP work is listed on the PHP developer page.
Examples of my work.
like2slide.com is a website for the ski, snowboard, and wakeboard community, built for inspiration, publishing, and stable operation.
marcoaldany.pl is a WordPress website built to present personalised services to show how this system can support companies offering personalised services or...
The website mavicon.pl has been designed with a view to providing a comprehensive presentation of the company’s offerings, which are based on innovative tech...
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.