Arpita Hunka
  • Member for 6 years
  • Last seen this week
How do I add a field on the Users profile? For example, country, age etc
92 votes

You need to use the show_user_profile, edit_user_profile, personal_options_update, and edit_user_profile_update hooks. You can use the following code for adding additional fields in User section Code ...

View answer
Storing textbox values in Database
2 votes

for displaying text box on the front end and storing data in database follow the below steps : Create a php file in your activated theme folder and put the following code : Now Create a page into ...

View answer
How to show my post type TEAM in dynamic way?
1 votes

As you said in a comment that you want to make it dynamic and wants to call anywhere of the website. Then in WP the best option is to use the shortcode. You can create a short code and call it where ...

View answer
Can't run database query
Accepted answer
1 votes

Here issue with the column name. You are using column key in the query which is the default keyword/index in mysql. For resolving this kind of issue just use the "Grave accent(`)' symbol in the ...

View answer
Show or hide custom fields by user's role [frontend]
Accepted answer
1 votes

Yes, it is possible to hide or show custom fields by user's role. Use current_user_can() for finding current user role. This function returns true if current user has capability or role. For example ...

View answer
Trying to add some custom text into Wordpress Post title via function.php
Accepted answer
0 votes

The first thing that i am not getting is $exclusive->y ? can you please share custom field settings that you have created? And the second thing that i have found, you must have to put global $post; ...

View answer
Need to convert string of term ids into comma separated integers for use in an arguments array
0 votes

You need to convert values into an integer array because you are getting string in this $doctor_procedures = location_doctors_procedure_loop(); variable. You can convert it by using following ...

View answer
Check if comment was successfully submited
0 votes

I have tried this in the following way, you can try this .... put the following code in functions.php function hide_comment_form_function( $comment_ID, $comment_approved ){ $commentData = ...

View answer
Check if comment was successfully submited
0 votes

The following example uses the comment_post hook to run a function immediately after a comment is posted. The function checks whether the comment is approved and, if so, executes the code specified. ...

View answer
Add Hook for clearing transient when post is added
0 votes

Add the below code in your active theme's functions.php file. function wpse_delete_query_transient( $post ) { // Deletes the transient when a new post is published delete_transient( '...

View answer
Where does the actual data stored by add_post_meta
Accepted answer
0 votes

Yes, we can use existing tables in WordPress for storing the values. Post meta fields are stored in the {$wpdb->prefix}_postmeta table (depending on the table prefix; wp_postmeta by default). If ...

View answer
How to stop WordPress from removing & from URL?
0 votes

You can use here rawurlencode() function. First pass "?&mkwid=smWfvaLGf_dm" this url into the function then you will get "%3F%26mkwid%3DsmWfvaLGf_dm" encoded value. Now go on the functions.php ...

View answer
FTP Username and password wrong while installing theme
-1 votes

NO, this is only because of the owner/permission of your folder where wordpress files are present. Please check the folder permission, if that is 0755 then replace it with 0777 by using chmod 777 -R ...

View answer