0
votes

I have a section in my wordpress theme I started from scratch, in that section I have a title, tagline and a description.

I am displaying them using:

for title:

get_bloginfo();

for tagline:

get_bloginfo('description');

I need a way where the user can write a longer description of the site and display it.

I only found on google how to add meta descriptions but that's not what I want.

1

1 Answers

0
votes

Wordpress keep those info in options table. You can do the same for yours. Checkout the following functions in wordpress documentation:

You need to have a unique key name for example desc_long which you will be using only for this purpose.

Here is some example snippet code:

// to save the value in database
update_option('desc_long', $_POST['input_field_name_in_form']);

// to remove the value from database
delete_option('desc_long');

// in your theme use the following to retrieve the value
get_option('desc_long');

As far as I can remember you can not add any extra functionality to existing setting pages where admin can entry long description and save it. If you already have any theme option page that is a good place to put this functionality, otherwise you will have to create it.