Skip to content

Instantly share code, notes, and snippets.

View asifpix's full-sized avatar

Asif Islam asifpix

  • iThemesLab
  • Bangladesh
View GitHub Profile
@asifpix
asifpix / wp-dimox-breadcrumbs.php
Created March 7, 2017 13:35 — forked from melissacabral/wp-dimox-breadcrumbs.php
breadcrumbs - place in functions.php and call in your theme with dimox_breadcrumbs() [Source](http://dimox.net/wordpress-breadcrumbs-without-a-plugin/)
<?php
/**
* Dimox Breadcrumbs
* http://dimox.net/wordpress-breadcrumbs-without-a-plugin/
* Since ver 1.0
* Add this to any template file by calling dimox_breadcrumbs()
* Changes: MC added taxonomy support
*/
function dimox_breadcrumbs(){
/* === OPTIONS === */
@asifpix
asifpix / Contact Form for Builder theme
Created March 11, 2017 10:43
Create a from for contact form 7 and paste this code to get the form.
<div class="row mb20">
<div class="col-sm-4 col-xs-12">
<label>Your Name <span>*</span></label>
[text* your-name]
</div>
<div class="col-sm-4 col-xs-12">
<label>Your Email <span>*</span></label>
[email* your-email]
</div>
<div class="col-sm-4 col-xs-12">
@asifpix
asifpix / gist:fe6376962730c15e6e85da5b13c8b91a
Created July 1, 2017 18:47
Joomla Hits Reset (Article, K2, SPPageBuilder)
UPDATE `#_content` SET `hits` = 0;
UPDATE `#_k2_items` SET `hits` = 0;
UPDATE `#_sppagebuilder` SET `hits` = 0;
//Note: "#" will be replaced with your database table prefix.
@asifpix
asifpix / WP Customizer - Checkbox
Created September 10, 2017 06:19 — forked from ajskelton/WP Customizer - Checkbox
Add a Checkbox field to the WordPress Customizer.
$wp_customize->add_setting( 'themecheck_checkbox_setting_id', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'themeslug_sanitize_checkbox',
) );
$wp_customize->add_control( 'themeslug_checkbox_setting_id', array(
'type' => 'checkbox',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Checkbox' ),
'description' => __( 'This is a custom checkbox input.' ),
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- head -->
<base href="http://localhost/rnd/tt/appetite/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="Joomla! - Open Source Content Management" />
@asifpix
asifpix / SCSS.md
Last active April 21, 2018 14:52 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@asifpix
asifpix / nav-menu-item-custom-fields.php
Created August 30, 2018 07:32 — forked from westonruter/nav-menu-item-custom-fields.php
Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
<?php
/**
* Proof of concept for how to add new fields to nav_menu_item posts in the WordPress menu editor.
* @author Weston Ruter (@westonruter), X-Team
*/
add_action( 'init', array( 'XTeam_Nav_Menu_Item_Custom_Fields', 'setup' ) );
class XTeam_Nav_Menu_Item_Custom_Fields {
static $options = array(
@asifpix
asifpix / site.php
Last active September 12, 2018 05:31
SPPB Addon
class SppagebuilderAddonSpecialDishes extends SppagebuilderAddons {
public function render() {
$output = 'asif';
return $output;
}
public static function getTemplate(){
}
}
<?php
//no direct accees
defined ('_JEXEC') or die ('restricted aceess');
SpAddonsConfig::addonConfig(
array(
'type'=>'repeatable',
'addon_name'=>'special_dishes',
'category'=>'Madison',
'title'=>'Special Dishes',
@asifpix
asifpix / functions.php
Created December 25, 2018 11:12
Adding Custom Icon in Elementor's default icons array. This snippet created by Asif Islam from iThemesLab.
<?php
function itl_icons_filters( $controls_registry ) {
// Get existing icons
$icons = $controls_registry->get_control( 'icon' )->get_settings( 'options' );
//Create array with your icon set
$newIcons = array(
'icon-001-worldwide' => 'worldwide',