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 / tab.php
Created December 16, 2016 18:22
Tab dynamic in wordpress
/*DEMO*/
<div id="tab">
<ul class="nav nav-tabs" role="tablist">
<?php $loop = new WP_Query( array( 'post_type' => 'candidates', 'posts_per_page' => -1 ) ); ?>
<?php
$counter = 0;
while ( $loop->have_posts() ) : $loop->the_post();
$counter++;
@TANVIRFAZLEY
TANVIRFAZLEY / Bootstrap carousel with font awesome icon.html
Created August 3, 2016 04:16
Bootstrap carousel with font awesome icon
@TANVIRFAZLEY
TANVIRFAZLEY / Bootstrap menu.html
Created August 3, 2016 04:24
bootstrap menu including
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
@TANVIRFAZLEY
TANVIRFAZLEY / wp theme development.php
Created August 3, 2016 05:45
wordpress theme development basic file incclude
WP Theme Development-1 (Create PHP Files)
header.php
==================================
< ?php bloginfo('name'); ?> = ব্লগের নাম আনার জন্য
< ?php echo get_template_directory_uri(); ?> = ডাইনামিক থিম ডাইরেক্টরী
< ?php bloginfo('stylesheet_url'); ?> = ডাইনামিক স্টাইল শীট
< ?php wp_head(); ?> = হেডারের ক্রীপ্ট পাওয়ার জন্য
@TANVIRFAZLEY
TANVIRFAZLEY / author.php
Last active October 8, 2022 12:03
Wordpress cheetsheet
<?php
//Display the link of the author page for the author of the current post
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a>
@TANVIRFAZLEY
TANVIRFAZLEY / mixitup.php
Created November 1, 2016 14:55
Dynamic mixitup for wordpress
<?php
//ata functions.php te dite hobe
Step# 01: Register Custom Post
******************************
# Register Custom Post
function wp_tutorials_post() {
register_post_type( 'cluster-portfolio',
array(
@TANVIRFAZLEY
TANVIRFAZLEY / ifelsedemo.php
Last active October 8, 2022 12:03
If else example
<?php
/* Provide an example of an "if – elseif - else" control structure that tests if $day is ‘Monday.’
If so, display ‘Today is Monday.’ Repeat the test of each weekday, displaying ‘Today is (name of the week day),
’ otherwise display “It is the weekend.”*/
$dayname = 'Monday';
if($dayname = 'Monday') :
echo 'Today is Monday.';
elseif() :
echo 'Today is ';
@TANVIRFAZLEY
TANVIRFAZLEY / admin.php
Created November 12, 2016 17:15
Upload Button Remove from slides
<?php
//Upload Button Remove
function redux_slides_upload_button_remove(){ ?>
<style type="text/css">
.button.media_upload_button{display:none;}
#about_img-media.button.media_upload_button{display:inline-block;}
</style>
<?php
}
add_action('admin_head' , 'redux_slides_upload_button_remove');
@TANVIRFAZLEY
TANVIRFAZLEY / conditional-page.php
Last active October 8, 2022 12:03
Using Conditional Tags in Page Templates
<?php
if ( is_front_page() ) :
get_header( 'home' );
elseif ( is_page( 'About' ) ) :
get_header( 'about' );
else:
get_header();
endif;
@TANVIRFAZLEY
TANVIRFAZLEY / sticky-menu.js
Created December 5, 2016 04:46
Jquery sticky menu
// Sticky Header
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$('.main_h').addClass('sticky');
} else {
$('.main_h').removeClass('sticky');
}
});