Where to put include php file?

First of all I must say that I don’t think this is a wordpress related question. That said I hope this following suggestion helps you go in the right direction… Basically the include(“xxx-xxx.php”); already tells you where to put the xxx-xxx.php – in this case it should go into the same directory where the ‘parent’ is … Read more

Edit the text location of a form

Inspect the text in your browser by right clicking it and picking Inspect. This should open up a window where you can adjust the CSS for all the elements on the page. You will need to play around with what needs changed. Once you figured out what needs to change, you can copy the new … Read more

Submit button returns to index page instead of sending data

Put var_dump($_SERVER[‘PHP_SELF’]); at the top of header.php and you will see the problem. That always points to index.php because nearly everything loads through index.php. Use get_permalink to get the “apparent” URL and use that instead of $_SERVER[‘PHP_SELF’] in the form action attribute.

Directing to functions.php the correct way

If you ‘have’ to do it this way, you should add the following line to the top of your above your include functions line: require(‘/path/to/yourdomain.com/httpdocs/wp-blog-header.php’); global $wpdb; // In case you need DB calls also @milo is correct though and you should think of a better way of doing this… Alternatively, you could look at … Read more

Reset form on onclick function

If you want to have a reset button you have to include a reset input in the form: <input type=”reset” value=”Reset!”> This element resets all form values to default values. In your example <input type=”button” onclick=”” value=”Neka bud”> – <input type=”submit” value=”Godkänn bud” /> <input type=”reset” value=”Reset!”> </form>

Auto populate a Form

add_filter( ‘comment_form_defaults’, ‘bootstrap3_comment_form’ ); function bootstrap3_comment_form( $args ) { $args[‘comment_field’] = ‘<div class=”form-group comment-form-comment”> <textarea class=”form-control” id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true” placeholder=”‘ . __( ‘Comment’, “beautiful” ) . ‘”></textarea> </div>’; return $args; } fetch your content and put it inside textarea tag. you should add this function to your functions.php it’s better to change name … Read more

jQuery color picker function on change

$(‘yourColorpickerselector’).wpColorPicker({ change: function(event, ui) { var form = $(this).closest(‘form’) form .trigger(‘change’) } }); within color picker default method “change”. you can trigger form change. or any other function, what you want to do. related link : wordpress discuss iris color picker

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)