Skip to main content

Posts

Showing posts from March, 2019

AJAX single file upload wordpress

< form method = "post" enctype = "multipart/form-data" >     < div class = "form-group" >        < label >Choose File:</ label >        < input type = "file" id = "file" />     </ div > </ form >   <script>      var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>" ;      jQuery( function ($) {          $( 'body' ).on( 'change' , '#file' , function () {              var file_data = $(this).prop( 'files' )[0];              var form_data = new FormData();              form_data.append( 'file' , file_data);      ...

Build Your Own Ajax Contact Form in WordPress

page.php < div id = "contact_form" >         < div id = "result" >< / div >         < div class = "form-group" >         < label for = "name" > Name < / label >         < input type = "text" name = "name" class = "form-control input-name" placeholder = "Enter Your Name" / >     < / div >     < div class = "form-group" >         < label for = "email" > Email < / label >         < input type = "email" name = "email" class = "form-control input-email" placeholder = "Enter Your Email" / >     < / div >       < div class = "form-group" >         < label for = "message" > Message < / label >           < textarea name = "message" class ...

WordPress Front-end AJAX Pagination with Search and Sort

Step 1 : Create a custom page in WordPress Go to your Dashboard > Pages > Add New Name the page anything you want, ex: My Posts In your Dashboard > Settings > Permalinks, make sure Common Settings is set to Post Name In your newly created page, copy the page slag: if you used “My Posts” as your page name, the slag would be my-posts In your WordPress theme create a file called page- my-posts .php  Notice how we attached the slag to the “ page- “, this will allow us to add custom scripts that will only apply to this specific page. Go to your browser and navigate to your new page. ex. http://example.com/ my-posts It should show you a blank white page , if not then you did something incorrectly. <link rel="stylesheet" href=" https :// maxcdn . bootstrapcdn . com / bootstrap / 3 . 3 . 5 / css / bootstrap . min . css " />  ---Open the new page and paste the following code template: <?php get_header(); ?>     <div class ...

add custom link and custom page to custom post type

admin-multiple-pdf-import.php:  <h1 class="wp-heading-inline">Add Multiple Dateien</h1>   <!-- Latest compiled and minified CSS -->         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">         <!-- Optional theme -->         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">         <!-- Latest compiled and minified JavaScript -->         <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha38...