Proper way to handle GET and POST request in WordPress

<?php add_action(‘init’,’handle_your_reqest’); function handle_your_request(){ if (isset($_REQUEST[‘your-key’])): // Your Code Here exit; endif; }  

WordPress Ajax: The Easy Way

January 29, 2019

This is a simple guide to implement an AJAX to your WordPress site. Quick Summary: Register your Javascript file to WordPress and localize your AJAX admin URL. Setup simple jQuery script to send post to admin URL. We also need setup the action function to handle the request. 1) Register your Javascript file to WordPress […]

Bootstrap 4 Pagination for WordPress

Copy wordpress-bootstrap-4-pagination.php from Add boostrap_4_pagination() to your archive page.

Create Custom Post Type for WordPress

Add this to your theme functions.php

Sticky Table Header using jQuery

April 23, 2018

Complete Tutorial – Coming Soon <style>     td{         vertical-align: middle!important;     }     .table-fixed-header.fixed-header thead {         position: fixed;         top: 0px;         background: white;         z-index: 9999;     }     </style> <script>     jQuery(document).ready(function(){                  var tableFixedHeader = $(‘.table-fixed-header’);                  var tableFixedHeaderHead = tableFixedHeader.find(‘thead’);         var tableFixedHeaderBody = tableFixedHeader.find(‘tbody’);                  tableFixedHeaderHead.css(‘width’, tableFixedHeaderHead.outerWidth());         tableFixedHeaderBody.css(‘width’, tableFixedHeaderBody.outerWidth());                  tableFixedHeaderHead.find(‘th’).each(function(){             $(this).css(‘width’, $(this).outerWidth() );         });                  tableFixedHeaderBody.find(‘td’).each(function(){             $(this).css(‘width’, $(this).outerWidth() ); […]