Try this Omer
$fields = array(
'author' => '<div class="form-group"><input class="form-control" id="author" name="author" type="text" placeholder="Name '.( $req ? '*' : '' ) .'" value="' . esc_attr( $commenter['comment_author'] ) . '" ' . $aria_req . ' /></div>',
'email' => '<div class="form-group"><input class="form-control" id="email" name="email" type="text" placeholder="E-mail '.( $req ? '*' : '' ) .'" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div>',
);
if($showURL == 1) {
$fields['url'] = '<div class="form-group"><input class="form-control" id="url" name="url" type="text" placeholder="Website '.( $req ? '*' : '' ) .'" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"' . $aria_req . ' /></div>';
}
Related Posts:
- Metabox repeating fields – radio buttons not saving correctly
- How can merge two arrays values in one array and save in database
- Error in WP_update_post
- Compare two meta key values against each other inside the get_posts array?
- Looping through WP_Post Object
- Need to get specific data from array
- Using a javascript file to access a get posts array
- WP_User_Query order by meta_key that is an array
- Generate an array of parent/child page IDs, based on parent page name
- How do I output a database option that is an array into a get_posts array?
- Can an array be used as a meta_query value?
- Listing and displaying WooCommerce Shipping Zones in the frontend? [closed]
- List of posts by day of the week
- Check if term object is in array
- ‘orderby’ => ‘rand’ alternative for better performance?
- how can i show only the parents in owl-carousel?
- Create shortcodes within foreach loop (using array)
- Using a variable in is_page(array())
- Remove duplicates – array_unique()
- Recent posts with featured image or fallback image with permalink
- Storing Array from returned database query and using the array in a new query
- get_the_tags() not iterating through for/while loop, but will with foreach
- get a simple array of all of the term names that exist in all taxonomies
- How to use $query->set with post__in?
- Reprinting tags with all attributes
- Exclude posts based on meta value
- Checking array against author id in loop
- Advanced Custom Fields – display label and value only if value entered
- meaning of (array)function()
- Grouping posts by a custom meta value
- wp_force_remove_style’ not found
- How can I access string value in an array?
- Get html data with javascript to php array and store to wordpress database
- How do I create a numbered list with PHP? [closed]
- How to use array in function to get only value I want
- Error while setting role
- How to say if meta_value is greater than 0 in an array?
- How to use two meta_compare in an array?
- Loop over Array and get the distinct ids
- How to access or parse key/values that have “string”
- Remove empty terms from array, sort alphabetically, update back to repeating field
- Only show first image in foreach loop
- Conditional multidimensional arrays and array_map
- How can I get all values from my array in a loop in php? [closed]
- Get all posts as an array ID => Name
- Filter by field with array value in ACF on WP REST API
- extract serialized array to use for wp-query
- get users search not working with array
- Multidimensional Array
- Separate array output into a
- Order a WP_Query by meta value where the value is an array
- Only load certain artists on this page
- add the value of a variable returned in a while loop [closed]
- Update value of a associative array with update_post_meta
- How to make sure relative URL works when site is not on root domain?
- Get URI from PodPress using PHP
- using images in next/previous_post_link [closed]
- Finding and removing duplicates within WP Arrays
- Custom functions for string data calculations
- MySQL Query Returns Array () In Shortcode
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Convert a column of a table containing an Array as response in HTML
- Create an array with all the links of the years’ archive (of a custom post type)
- Display just one post from a loop of 5 posts?
- Redux option doensn’t seem when include from functions.php
- how to separate an array into different arrays and save them into db?
- How to insert multiple rows and columns in database using array
- Display one random image from Media Library
- ACF – Get ID of relationship field in flexible content
- Replace an array (with identical values) with another array in the_content
- get_category_parents to array
- Combine multiple queries, array_unique returns nothing
- Store custom field’s multiple values in one user meta key
- get_users when from meta key that has serialized values
- make an array in wordpress cusmization api?
- Trouble with checked() for array of multiple checkboxes
- How can get all users by current user meta (array)?
- How can i iterate through this shortcode array?
- How to replace hard-coded list of custom taxonomy terms based on custom field query [closed]
- Get a list of tags present in a paged front page
- Add custom filter to register data in array
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Auto remove empty values in array
- Non-array argument in array_merge()-function [closed]
- Display a post based on its metabox selection
- Unserializeing multiple column values that are stored in one database results variable
- How to get values from wordpress listings and use them in javascript array?
- Repeatable field within repeatable group of fields
- wp_get_archive for category returning different URLs on different but similar sites
- get_permalink returning first letter
- Showing all post from all post type in admin backstage
- How to print array of specific item
- What is this mark for “? function()” [closed]
- Use php array outside his function
- Retrieve Array from within Array [closed]
- get_body_params() is always empty in POST request
- save array of objects with update_option
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Replace block content with an array
- Adding date and time to the same request