Skip to content

Instantly share code, notes, and snippets.

View mustafix's full-sized avatar

Mustafizur Rahman mustafix

View GitHub Profile
// for comments
<?php if ( comments_open() ) : ?>
<span class="on-your-class"><?php comments_popup_link('No Comment', '1 Comment', '% Comments'); ?></span>
<?php endif; ?>
// for tags
<span class="entry-tags"><?php if (function_exists('the_tags')) the_tags('Tags: ', ', '); ?></span>
// html code
===========================================
<div class="main-menu floatright">
<ul id="nav">
<li><a href="">Home</a></li>
<li><a href="">About Me</a></li>
<?php
//----------------------------------------------------------
'.get_the_title().'
'.get_the_content().'
'.get_the_excerpt().'
'.get_the_author().' // author এর নাম আনার জন্য
'.get_author_posts_url(get_the_author_meta('ID')).' // author এর নাম এর সাতে লিঙ্ক আনার জন্য
'.get_avatar(get_the_author_meta('ID'), 60).' // avata থেকে user এর ছবি আনার জন্য
'.get_the_date().'
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php
// function.php
function single_shortcode( $atts, $content = null ) {
extract( shortcode_atts( array(
'title' => '',
'des' => '',
<?php
// function.php
function double_shortcode($atts, $content = null){
extract( shortcode_atts( array(
'category' => '',
'count' => '',
'title' => '',
'des' => '',
<?php
if ( ! function_exists( 'theme_function_name' ) ) :
function theme_function_name(){
// style sheet dynamic
wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css', array(), '3.1.0', 'all');
wp_enqueue_style('flipmart-main-css', get_stylesheet_uri() );
<?php
// functions.php
//Menu Register
function wp_theme_menu(){
register_nav_menus(array(
'header_menu' => 'Header Menu',
));
}
<?php
add_theme_support('post-formats',array('gallery', 'aside', 'image', 'audio', 'video'));
add_theme_support('post-thumbnails');
add_image_size('protfolio-thumb',330,250,true);
?>
<!--- Register sidebars and widgetized areas ---->
<?php
function cerate_widget_areas() {
register_sidebar( array(
'name' => __( 'Welcome Message', 'brightpage' ),
'id' => 'footer_widget',