Skip to content

Instantly share code, notes, and snippets.

View codersaiful's full-sized avatar

Saiful Islam codersaiful

View GitHub Profile
<?php
//Copy this bellow line code and replace with indicated of screenshot. Screenshot: http://prntscr.com/jzefu7
$wpt_single_product_title .= get_the_title();
<?php
$post_imit_each_column = 4;
/**
* To get all Categores as Array,
* Each array Item will be Object - Remember it
* Tuts for: https://www.facebook.com/groups/rrfoundation/permalink/1714332322007066/
* And: https://www.facebook.com/groups/UFTalent/permalink/401160307058625/
*
* @author Saiful Islam<[email protected]>
*/
# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep
<?php
//codersaiful new code START here
if(isset($data['fields']['field61921']) && !empty($data['fields']['field61921'])){
$data['fields']['field61921'] = get_the_title($data['fields']['field61921']);
}
if(isset($data['fields']['field61922']) && !empty($data['fields']['field61922'])){
$data['fields']['field61922'] = get_the_title($data['fields']['field61922']);
}
//codersaiful new code END here
@codersaiful
codersaiful / ICS.php
Created October 22, 2018 18:13 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):
@codersaiful
codersaiful / wp_ics.php
Created October 22, 2018 18:14 — forked from Jany-M/wp_ics.php
[WP] Generate a downloadable .ics file from any WordPress post or custom post type
<?php
// Add a custom endpoint "calendar"
function add_calendar_feed(){
add_feed('calendar', 'export_events');
// Only uncomment these 2 lines the first time you load this script, to update WP rewrite rules
/*global $wp_rewrite;
$wp_rewrite->flush_rules( false );*/
}
add_action('init', 'add_calendar_feed');
select.query_box_direct_value,label.search_keyword_label.single_keyword {
display: none;
}
.wpt_search_box .search_single .search_single_column {
width: 100%;
float: none;
}
<ul id="site-header-cart" class="site-header-cart ">
<li class="">
<a class="cart-contents" href="http://localhost/CleaniaCommerce/cart/" title="View your shopping cart" style="opacity: 1;">
<span class="amount">$40.00</span> <span class="count">3</span>
</a>
</li>
<li>
<div class="widget woocommerce widget_shopping_cart">
<div class="widget_shopping_cart_content" style="opacity: 1;">
<ul class="woocommerce-mini-cart cart_list product_list_widget ">
if( !function_exists( 'load_terms_by_ajax' ) ) {
function load_terms_by_ajax(){
$ky = isset( $_GET['q'] ) && !empty( $_GET['q'] ) ? $_GET['q'] : '';
$term_name = isset( $_GET['key'] ) && !empty( $_GET['key'] ) ? $_GET['key'] : '';
$texonomy_sarch_args = array('hide_empty' => true,'orderby' => 'name','order' => 'ASC', 'name__like' => $ky, );
$tax_obj = get_terms( $term_name, $texonomy_sarch_args );
$arr['results'] = array();
if( count( $tax_obj ) > 0 ){
foreach( $tax_obj as $item ){