This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reference for Wordpress Functions | |
https://codex.wordpress.org/Function_Reference | |
https://developer.wordpress.org/ | |
/***********************/ | |
Display terms with pagination start | |
if ( get_query_var( 'paged' ) ) | |
$paged = get_query_var('paged'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .htaccess in codeigniter to remove index.php | |
Replace the below code in config.php file. | |
$config['index_page'] = "index.php" | |
// Remove index.php | |
$config['index_page'] = "" | |
create .htaccess file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
jQuery(document).ready(function(){ | |
jQuery(document).on("click",".openpopup",function(){ | |
jQuery(".popmain").show(); | |
}); | |
jQuery(document).on("click",".closepopup",function(){ | |
jQuery(".popmain").hide(); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//compare a date with current date | |
$end_date = 2018-06-24 | |
if((time()-(60*60*24)) < strtotime($end_date)) | |
//simple curl | |
$ch = curl_init(); | |
$curlConfig = array( | |
CURLOPT_URL => "http://www.example.com/yourscript.php", | |
CURLOPT_POST => true, | |
CURLOPT_RETURNTRANSFER => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://wordpress.org/plugins/nav-menu-roles/ Nav Menu Roles By Kathy Darling | |
https://wordpress.org/plugins/woocommerce-products-filter/ For product filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To make archive listing yearly instead of monthly | |
*/ | |
function my_limit_archives( $args ) { | |
$args['type'] = 'yearly'; | |
return $args; | |
} | |
add_filter( 'widget_archives_args', 'my_limit_archives' ); | |
add_filter( 'widget_archives_dropdown_args', 'my_limit_archives' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class functions | |
{ | |
function token_generate($length = 10) | |
{ | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$charactersLength = strlen($characters); | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in this file we wil define all generic functins | |
// This is to display data from table | |
function get_table_data($tbl, $where='', $order='', $limit='') | |
{ | |
global $conn; | |
$sql = "select * from $tbl"; | |
if(!empty($where)) | |
{ | |
$sql .= " where $where"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to redirect http://domain.com to https://www.domain.com? | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
********************* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/questions/18480105/how-to-show-multiple-areas-by-location-in-google-maps-using-php | |
var map; | |
var geocoder; | |
var marker; | |
var people = new Array(); | |
var latlng; | |
var infowindow; | |
$(document).ready(function() { |
OlderNewer