Skip to content
Advertisement

how to add a link that its “href” is editable in word press panel?

Is there a way to create a link in theme file that its href value is editable in wp panel? e.g.

<a href="<?php wp_editable_link(); ?>">view some page</a>
// wp_editable_link() is that function I need to find...

So … any ideas?

Advertisement

Answer

I found the answer to my question. thanks to @CBore


I should use update_option() for saving/updating the value.

and use get_option() to get my value.

and also create a panel for my wp theme that those values are editable there.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement