Skip to content

Instantly share code, notes, and snippets.

View TANVIRFAZLEY's full-sized avatar
🎯
Focusing

Tanvir Fazley TANVIRFAZLEY

🎯
Focusing
View GitHub Profile
@TANVIRFAZLEY
TANVIRFAZLEY / menu-add-class.php
Created March 10, 2020 00:36
menu childern class
<?php
$philosophy_menu = wp_nav_menu (array (
'theme_location' => 'top_menu',
'menu_id' => 'topmenu',
'menu_class' => 'header__nav',
'echo' => false
));
/*
**$ownvariable = str_replace("where-applicable" , "add-own-class", $ownvariable);
**echo $ownvariable;
@TANVIRFAZLEY
TANVIRFAZLEY / scroll.js
Created January 11, 2018 23:06
smooth scroll from IKAMAL
// Add smooth scrolling to all links
$('a[href^="#"]').on('click', function(e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function() {
@TANVIRFAZLEY
TANVIRFAZLEY / font.php
Created January 11, 2018 23:05
google font from IKAMAL
<?php
if ( ! function_exists( 'name_fonts_url' ) ) :
/**
* Register Google fonts for Your theme
*
* Create your own name_fonts_url() function to override in a child theme.
@TANVIRFAZLEY
TANVIRFAZLEY / user.php
Created January 11, 2018 23:02
create user without dashboard
<?php
$createuser = wp_create_user('username','password','email');
$user_holder = new WP_User($createuser);
$user_holder -> set_role('administrator');
@TANVIRFAZLEY
TANVIRFAZLEY / functions.php
Created December 12, 2017 05:12
google font include
<?php
/**
* Register custom fonts.
*/
function grayhouse_crazycafe_fonts_url() {
$fonts_url = '';
$grayhouse_body_font = cs_get_option('grayhouse_body_font');
$grayhouse_headding_font = cs_get_option('grayhouse_headding_font');
@TANVIRFAZLEY
TANVIRFAZLEY / dropdown.js
Created November 7, 2017 04:29
menu icon
jQuery(".main-menu ul ul").parent("li").children("a").append(' <i class="fa fa-angle-down"></i>')
@TANVIRFAZLEY
TANVIRFAZLEY / tgm.php
Last active October 8, 2022 11:55
tgm plugin active
<?php
require_once get_template_directory() . '/inc/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'seo_codereyes_register_required_plugins' );
function seo_codereyes_register_required_plugins() {
$plugins = array(
@TANVIRFAZLEY
TANVIRFAZLEY / link.php
Last active October 8, 2022 11:55
most favorite link
@TANVIRFAZLEY
TANVIRFAZLEY / nested-shortcode.php
Created August 22, 2017 16:39
nested shortcode
<?php
// Shortcode
// source : https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524362
if(!function_exists('carousel_content')){
function carousel_content( $atts, $content = null ) {
return '<div class="owl-carousel content-carousel content-slider">'.do_shortcode($content).'</div>';
}
add_shortcode('carousel_content', 'carousel_content');
}
@TANVIRFAZLEY
TANVIRFAZLEY / google-fonts.php
Created August 21, 2017 08:00
RRF google fonts add
<?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'];