How to use some global defined strings in pages
-
I’m very new to WordPress but expert in PHP.
We would like to have a file that has some strings that we can then use within Pages. I’ve added
define(‘BCM_NAME’,’ABC Company’);
to the wp-config.php at the bottom and can’t figure out how to get it to show in the Pages.
Within a page using the visual editor I’ve tried to add:
BCM_NAME
${BCM_NAME}
<?php echo BCM_NAME; ?>even as a long shot I tried
[php echo BCM_NAME]
and all other things I can think of.
Surely there is a simple way to do this right?
By the way, these strings don’t have to be in PHP, it could easily be an XML file or something, just as long as I can make a key/pair and use the key in the Pages. Since those key/pairs change but the Page text doesn’t (it’s only things like company names, email, address, phone, etc.) We have hundreds of pages where we want to re-brand them and editing every page for every brand is very time consuming.
- The topic ‘How to use some global defined strings in pages’ is closed to new replies.