Skip to content

Instantly share code, notes, and snippets.

View TanvirAmi's full-sized avatar
🏠
Working from home

Tanvir TanvirAmi

🏠
Working from home
View GitHub Profile
<?php
/**
* Grid classic block.
*
* @package TrueReview
* @author Theme Junkie
* @copyright Copyright (c) 2016, Theme Junkie
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @since 1.0.0
*/
<?php
/**
* Modern vertical block.
*
* @package TrueReview
* @author Theme Junkie
* @copyright Copyright (c) 2016, Theme Junkie
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @since 1.0.0
*/
<?php
/**
* Modern block.
*
* @package TrueReview
* @author Theme Junkie
* @copyright Copyright (c) 2016, Theme Junkie
* @license http://www.gnu.org/licenses/gpl-2.0.html
* @since 1.0.0
*/
@TanvirAmi
TanvirAmi / woocommerce.css
Created March 24, 2019 21:30
Latest woocommerce styling for adios
.woocommerce del,
.woocommerce-page del {
color: #abaeaf;
}
.woocommerce ins,
.woocommerce-page ins {
color: #272b2b;
text-decoration: none;
}
<div class="entry-info entry-header col-md-2">
<?php gomedia_post_author(); // Get the post author info. ?>
<?php gomedia_social_sharing(); // Get the social sharing. ?>
<?php
$tags_list = get_the_tag_list( '<ul><li>','</li><li>','</li></ul>' );
if ( $tags_list ) :
?>
@TanvirAmi
TanvirAmi / teams.php
Last active September 24, 2018 21:36
Team template for Theme Junkie team content plugin
<?php
/**
* Template Name: Teams template
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main" <?php hybrid_attr( 'content' ); ?>>
<?php if ( have_posts() ) : ?>
<?php
/**
* Customize comment form default fields.
* Move the comment_field below the author, email, and url fields.
*/
function custom_comment_form_default_fields( $fields ) {
$commenter = wp_get_current_commenter();
$user = wp_get_current_user();
$user_identity = $user->exists() ? $user->display_name : '';
$req = get_option( 'require_name_email' );
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
<?php
/**
* http://webdeveloperswall.com/php/get-youtube-video-id-from-url
**/
function extractUTubeVidId($url){
/*
* type1: http://www.youtube.com/watch?v=9Jr6OtgiOIw
* type2: http://www.youtube.com/watch?v=9Jr6OtgiOIw&feature=related
* type3: http://youtu.be/9Jr6OtgiOIw
*/
@TanvirAmi
TanvirAmi / WP_Latest_Posts_Widget.class.php
Created August 16, 2018 12:00
Custom popular post widget(MagPlus)
<?php
/**
* Latest posts widget
*
* @package magplus
*/
class magplus_WP_Latest_Posts_Widget extends WP_Widget
{
function __construct()
{