$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>customization - How can I edit the Wordpress menu link to allow fb: instead of http|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

customization - How can I edit the Wordpress menu link to allow fb: instead of http

matteradmin10PV0评论

Long story, but I'm building a site with social icons in my menu bar (as menu items). I'd like them to open respectively on the device's app when clicked on (for example Facebook app on iOS). Problem is, is that my theme isn't allowing me to save menu items with links starting with anything other than http or https.

Where and how can I allow this feature in the theme's file or wherever it is?

Long story, but I'm building a site with social icons in my menu bar (as menu items). I'd like them to open respectively on the device's app when clicked on (for example Facebook app on iOS). Problem is, is that my theme isn't allowing me to save menu items with links starting with anything other than http or https.

Where and how can I allow this feature in the theme's file or wherever it is?

Share Improve this question asked Dec 6, 2018 at 17:26 Marcel Du PlessisMarcel Du Plessis 11 bronze badge 1
  • You need to provide more details. What theme are you using? What have you tried? How are you adding these links: admin menu creator? – RiddleMeThis Commented Dec 6, 2018 at 17:59
Add a comment  | 

1 Answer 1

Reset to default 0

It's not your theme that's preventing menu items from being saved with fb: protocol. It's WP Core. WP Menu items are intended to be web URLs, because visitors can typically access a WP site from any device - not just a mobile device. Even a mobile device that doesn't have the Facebook app installed would not recognize a fb: link.

My suggestion would be to create a menu through your theme through some other means - not a WP Menu, but programmatically or even hard-coded, depending on your site's needs.

Post a comment

comment list (0)

  1. No comments so far