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
/**
* Mega Menu Category B - Display sub cats, a featured and recent posts.
*/
?>
<div class="sub-menu mega-menu mega-menu-b wrap">
<div class="sub-cats">
<?php
/**
* Mega Menu Category - Display recent posts from a parent category.
*/
// Walker to create the left part of mega menu
$sub_walker = new Walker_Nav_Menu;
$have_sub_menu = !empty($sub_items) ? true : false;
if (!isset($sub_items)) {
<?php
/**
* Partial template for Author Box
*/
?>
<section class="author-info">
<?php echo get_avatar(get_the_author_meta('user_email'), 95); ?>
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
$option_name = '_tb_options';
CSF::createOptions( $option_name, array(
'framework_title' => esc_html__('Webify', 'webify'),
'menu_title' => 'Theme Options',
'menu_slug' => 'tb-theme-options',
'menu_type' => 'submenu',
'show_in_customizer' => true,
'menu_parent' => 'webify_theme_welcome',
<?php
/**
* Header Template
*
* @package webify
* @since 1.0
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
@TanvirAmi
TanvirAmi / wp-exclude-child-categories.php
Created July 29, 2023 13:16 — forked from CodeProKid/wp-exclude-child-categories.php
Exclude child categories from a category archive page in WordPress
<?php
/**
* Excludes child terms from the main query on the category archive.
*
* @param object $query the WP_Query instance
* @return void
* @access public
*/
function rk_fix_tax_queries_on_archives( $query ) {
<?php
add_theme_support( 'automatic-feed-links' );
add_editor_style();
//add_custom_image_header();
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) )
<?php
/**
* Frontend Theme Functions.
*
* @package magplus
* @subpackage Template
*/
/**
* Theme Loader
* @param string $logo_field
<?php
/**
* Frontend Theme Functions.
*
* @package magplus
* @subpackage Template
*/
/**
* Theme Loader
* @param string $logo_field
<?php
/**
* Partial template for social share buttons on single page.
*
* See: inc/social-share.php for filters and caller.
*/
$props = array_replace([
'active' => [
'facebook', 'twitter', 'pinterest', 'linkedin', 'tumblr', 'email'