I want to implement a system to insert custom links in my wordpress custom theme. I don't want to hardcode these links inside my theme. These links are for the socials or partners website. So they need to be easily changed from WordPress dashboard. I want to avoid registering a custom post type or using a post. Is this possible with a custom function or a similar solution?


You could use ACF https://www.advancedcustomfields.com/ and create a custom field for the links. Then use the value in the template. The ACF web site has some great documentation and examples.


I think there are multiple ways of adding dynamic links to your theme. For example,

  1. Theme Customization API / Customizer
  2. Settings API
  3. Navigation menus
  4. Links manager (maybe outdated?)
  5. If the links are shown on a certain page (template), then maybe a custom meta box

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.