Skip to content

Instantly share code, notes, and snippets.

Rasel Ahmed raselahmed7

Block or report user

Report or block raselahmed7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wordpress-custom-search.php
add_action( 'init', 'my_theme_custom_post' );
function my_theme_custom_post() {
register_post_type( 'agent',
'labels' => array(
'name' => __( 'Agents' ),
View cart-functions-filter.php
function header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
$fragments['a.cart-button'] = ob_get_clean();
return $fragments;
View cart-functions.php
function woocommerce_cart_link() {
global $woocommerce;
<a href="<?php echo esc_url($woocommerce->cart->get_cart_url()); ?>" title="<?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> <?php _e('in your shopping cart', 'woothemes'); ?>" class="cart-button ">
<span class="label"><?php esc_html_e('My Basket:', 'woothemes'); ?></span>
<?php echo esc_html($woocommerce->cart->get_cart_total()); ?>
<span class="items"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); ?></span>
View stock-googlemap-shortcode.php
function stock_styled_map_shortcode($atts, $content = null) {
extract( shortcode_atts( array(
'lat' => '40.7433379',
'lng' => '-74.0103219',
'title' => 'Head Office',
'desc' => 'House 21, Grand St.<br/> New York, USA',
View style.css
.shopping-icon {
border: 1px solid #ddd;
border-radius: 50%;
color: #1b80bb;
font-size: 18px;
height: 53px;
line-height: 50px;
position: absolute;
right: 0;
text-align: center;
View index.html
<div class="header-area">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="logo">
<h2><a href="index.html">Stock</a></h2>
<div class="col-md-9">
View logocarouselshortcode.php
if ( ! defined( 'ABSPATH' ) ) { exit; }
function educare_logo_carousel_shortcode( $atts, $content = null ) {
extract( shortcode_atts( array(
'logos' => '',
'count' => '6',
'tablet_count' => '4',
raselahmed7 / google-fonts.php
Last active Apr 3, 2019
How to call google fonts from theme option in best way
View google-fonts.php
$frozen_body_font_get = cs_get_option('frozen_body_font');
$frozen_heading_font_get = cs_get_option('frozen_headding_font');
function frozen_crazycafe_body_gf_url() {
$font_url = '';
$frozen_body_font_get = cs_get_option('frozen_body_font');
if(array_key_exists('family', $frozen_body_font_get)) {
$frozen_body_font_get_family = $frozen_body_font_get['family'];
View jquery-detect-apple-touch-devices.js
var deviceAgent = navigator.userAgent.toLowerCase();
var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
if (agentID) {
// mobile code here
raselahmed7 / custom-post-loop-with-pagination-shortcode.php
Last active May 5, 2019
Custom post loop with pagination in shortcode
View custom-post-loop-with-pagination-shortcode.php
function portfolios_shortcode($atts){
extract( shortcode_atts( array(
'expand' => '',
), $atts) );
global $paged;
$posts_per_page = 6;
$settings = array(
You can’t perform that action at this time.