Set and use a variable (like a contact name)?

Apologies if this is a really stupidly easy question, but I’m having difficulty.

I see how it’s easy to set and use some of the “built-in” variables in WordPress, like a site title or tag line (set them under settings/general, then add the corresponding block) But can I add to that list?

For instance, let’s say I have several different places on a site that refer to a specific contact person, and I want to make my life easy if that person ever leaves their position. I’d like to do something like define that \[contact\_person\_a\] is “John Smith”, then insert a field into my text like “Please contact \[contact\_persona\_a\]…” so that if John ever quits, I can simply update \[contact\_person\_a\] to be “Sally Jones,” rather than manually update every single page/post.

Is this possible? (Preferably without touching actual code?) Thanks!

2 Comments
  1. You can try the ACF shortcodes, that’s pretty similar to what you’re trying to do.

  2. If I had to approach this, I’d use [Advanced Custom Fields](https://www.advancedcustomfields.com/). But I use ACF as a foundation for all of my websites. You can create custom fields for specific posts or pages, but you can also create option pages for sitewide features.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer