functions - Add dynamic links in WordPress custom theme

I want to implement a system to insert custom links in my wordpress custom theme. I don't want to hardcode these li

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?

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?

Share Improve this question edited May 15, 2019 at 13:23 Fayaz 9,0172 gold badges33 silver badges51 bronze badges asked May 15, 2019 at 12:09 YikkoYikko 155 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

You could use ACF https://www.advancedcustomfields/ 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745489610a4629928.html

相关推荐

  • functions - Add dynamic links in WordPress custom theme

    I want to implement a system to insert custom links in my wordpress custom theme. I don't want to hardcode these li

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信