Total WordPress Theme Code Snippets 640
Total is a very modular theme making it easy to tweak and customize to your liking. Below you will find various snippets that you can use to make adjustments to the theme. While some of these could be added as a new option to the Customizer I have decided against it because it just adds more bulk and slows things down. Sometimes using a snippet is best. Make sure you are using a child theme for all PHP edits. For CSS edits you can use the Custom CSS panel or your child theme, either one is fine.
Core
- php Custom Metaviewport Tag
- php Altering Layouts (Full Screen, No Sidebar, Left Sidebar, Right Sidebar)
- php Remove Recommended Plugins Notice
- php Add/Remove Image Sizes
- php Allow Skype Links In The Theme
- php Alter The Default Excerpt Arguments
- php Remove Recommended Plugins
- css Remove/Hide The Edit Page/Post Links
- php Conditionally Show/Hide The Footer Callout
- php Alter Any Post Type Archive To Display Like the Blog
Toggle Bar
Top Bar
- php Move Top Bar Outside The Header
- php Conditionally Enable/Disable The “Topbar”
- php Move Topbar Under Main Header
- php Topbar Custom Image Icons
- php Move Topbar Inside Header Wrapper (useful to add it inside the header Overlay)
- php Custom Topbar Social Link for Another Language (WPML)
- php Add New Top Bar Social Options
- php Conditionally Alter Topbar Content
- php Add Rel Nofollow To Top Bar Social Links
- php Remove Top Bar Social Links Title Attributes
Header
- php Move Aside Content On Top Of Logo For Header Three
- php Add Secondary Custom Menu Under Header
- php Conditionally Disable Fixed Header/Menu
- css Display Header Aside On Mobile Devices
- php Correct Way Of Adding Extra Content To Header
- php Alter The Sticky Shrink Header Height
- php Replace Site Header With Visual Composer or Other Page Content
- php Shift The Header Five (Centered Logo) Logo
- css Center Navigation On Boxed Layout With Header Style 2 or 3
- php Move Header To Site Footer
Logo
- php Custom Logo URL/Link
- php Custom Logo Image
- php Alter The Logo Alt & Title Attribute
- css Center Logo For Mobile Devices
- php Shift The Header Five (Centered Logo) Logo
- php Custom Logo For Mobile Devices
- php Remove The Header Logo
- php Remove http/https Protocol From Logo Image SRC
- php Add Subheading Under Logo
- php Custom Logo Per Language
Menu
- php Alter The “bars” (hamburger icon) In The Mobile Menu Toggle Link
- php Fixed Header Instead of Menu For Header Style Two, Three and 4
- css Open Main Menu Dropdowns To The Left
- css Alter Header Style Two Menu Height
- php How to Display Custom Menus Based on the Current Page
- php Disable the Total Theme Menu & Mobile Menu
- css Display Mobile Menu Always & Hide Default Menu
- php Conditionally Disable Fixed Header/Menu
- php How to Change The Main Menu Location Conditionally
- php Display A Global Menu For Your Multi-Site Network
Page Title
- php Alter Main Page Title
- php Alter Page Title Subheading
- php Alter The Page Header Style
- php Display Page Title Above Content
- php Disable Page Header Title on ALL Pages
- php Use Featured Image For Page Header Background
- php Alter Page Header Title String, HTML Tag & Schema
- css Automatically Add Space Under Header For Pages Without A Title
- php Set A Background Image For The Page Title On All Pages/Posts
- php Remove Title From Page Header Area
Breadcrumbs
- php Remove “Cart” from breadcrumbs
- php Remove Page Title From Breadcrumbs
- php Remove “Shop” From The Breadcrumbs
- php Remove/Hide Categories From Breadcrumbs
- php Disable Yoast SEO Breadcrumbs Support
- php Alter Home Link In Breadcrumbs
- php Remove Portfolio Categories From Breadcrumbs
- php Adding New Items To The Total Breadcrumbs Trail
- php Replace Breadcrumbs with NavXT Breadcrumbs
- php Custom Breadcrumbs Arguments
Footer
- css Center Bottom Footer Links
- php Move Footer Outside of Boxed Layout
- css Add Background Image to Footer Widgets
- php Conditionally Show/Hide Footer Widgets
- php Different Footer Widget Columns on Mobile
- php Add a 6th Column to the Footer Widget Columns
Customizer
- php Add/Remove Typography Options
- php Remove all Google Fonts from the typography settings panel
- php Add Custom Font To The Customizer
- php Remove All Customizer Google Font Options
- php Add Custom Setting to Total Customizer Tabs
- php Remove Additional CSS Tab from Customizer
Fonts & Typography
- php Add Custom Font To TinyMCE Editor
- php Add New Google Fonts To The Typography Font List and Total VC Modules
- php Add Fonts to The Total VC “Heading” Module
- php Disable All Google Services (Fonts)
- php Adding New Google Font Options To The TinyMCE Editor
- php Custom Google Font Lists
- php Define Google Font Weights To Be Enqueued
- php Remove all Google Fonts from the typography settings panel
- php Add Custom Font To The Customizer
- php Remove All Customizer Google Font Options
Post Meta
- php Adding/Removing Page Settings Metabox From Post Types
- php Adding/Removing Fields & Tabs In Page Settings Metabox
- php Include or Exclude Gallery Metabox from Post Types
- php Set Default Values for Post Metabox Settings
- php Display only Media Post Meta Tab for Non-Admins
- php Disable Theme Settings Metabox Completely
- php Remove Author Links from Post Meta & Author Bio
- php Custom Categories List Separator
- php Only Show Staff Settings in the Theme Settings Metabox when Editing Staff Posts
Sliders
- php Display A Post Slider Anywhere
- php Alter Default Post Slider Position
- php Slider Revolution Accessibility (tab support) for Bullets and Arrows
Lightbox
- php Load Lightbox Scripts Site-Wide
- php Change Lightbox Gallery To Vertical Scroll
- php Add Parameters to all Youtube Lightbox Videos
- php Add Custom Parameters to Youtube Video oEmbeds
- php Lightbox Auto Slideshow
- php Add Custom Params to Lightbox Videos
- php Enable Lightbox Infinite Loop
Translations
- php Add Language Files In Child Theme
- php Show Different Sliders For Polylang
- php Change Front-End Site Language Without Changing Admin Language
- php Translate Any Plugin/Theme Text via Your Child Theme
Search
- php Display Search Results Like Your Blog
- php Customize Your Search Placeholder Text
- css Display Search Icon For Header Style 2
- php Remove Search Results Sidebar
- php Custom Search Results Thumbnail Cropping
- php Alter “You searched for…” Subheading On Search Results
- php Limit Search Results to Standard (Blog) Posts only
- php Alter Search Results Page Header Title (Search results for….)
- php Highlight Search Terms
Blog
- php Custom Blog Style
- php Add New “Blocks” To The Blog Entry Layout
- php Add New “Blocks” To The Blog Post Layout
- php Display Video/Audio Embeds For Related Blog Items
- php Display Author Bio On Author Archive
- php Expand The “Full-Width Media” For Blog Posts Across The Whole Screen
- php Display Blog Post Featured Image Full-Width For All Posts
- php Display Blog Post Featured Image As Page Header Background
- php Display Read-More Button For Blog Posts With The Read-More Tag Only
- php Hide Footer Callout For All Blog Archives & Posts
Post Series
- php Change Post Series Archive Layout
- php Change Post Series Archive Entry Style
- php Change Post Series Order
- php Enable Post Series For Custom Post Type
Pages
- php Automatically Display Featured Image At The Top Of Pages
- php Disable Page Header Title on ALL Pages
Portfolio
- css Hide Related Portfolio Heading
- css Hide Related Portfolio Item Excerpt (CSS)
- php Disable Related Portfolio Item Excerpt (PHP)
- php Tweak The Visual Composer Total Grid Filter Links Arguments
- php Add Portfolio Category To Single Portfolio Post Slug
- php Add Meta Option To Portfolio Posts For Disabling Auto Media
- php Add New “Blocks” To The Portfolio Post Layout
- php Alter The Portfolio Related Posts Heading
- php Change Related Portfolio Query Arguments
- php Portfolio Category Description Above Loop
Staff
- php Add new staff social profiles
- php Snippets: Add New “Blocks” To The Staff Post Layout
- php Staff Category Description Above Loop
- php Enable HTML For Staff Position
- php Order Related Staff by Name
- php Adding a First & Last Name Field for Staff Members
- php Remove Staff Social Options
- php Add Xing to Staff Social Profiles
- php Remove Staff Meta Settings & Image Gallery
Testimonials
- php Display Testimonial Post Title On Single Testimonials Page Header
- php Add A Single Testimonial Shortcode
- php Display Read More link for Testimonials with Custom Excerpts
Custom Post Types
- php Enable the “Media” Post Settings For Custom Post Types
- php Alter Meta Sections (date, comments, author, etc) For Custom Post Types
- php Enable Social Sharing On Custom Post Types
- php Add Overlay To Custom Post Type Entry
- php Add/Remove “Blocks” (Sections) From Custom Post Type Posts
- php Add/Remove “Blocks” (Sections) From Custom Post Type Entries
- php Custom Post Type Post Thumbnail Arguments (size, alt, schema, style, etc)
- php Enable The Image Gallery For Custom Post Types
- php Easy Custom Post Type Entry Override
- php Related Items for Custom Post Type
Mobile
- php Alter The “bars” (hamburger icon) In The Mobile Menu Toggle Link
- php Disable The Mobile Sidebar Displace Animation
- css Center Mobile Menu
- php Move Sidebar Above Content On Mobile
- css Display Mobile Menu Always & Hide Default Menu
- css Hide Sidebar Mobile Menu Searchbar
- php Add/Remove Elements From The Sidebar Mobile Menu
- css Display Mobile Menu Icons Always
- php Conditionally Select Mobile Menu Style
- php Custom Logo For Mobile Devices
WPBakery Page Builder
- css Disable Tabs And Show All Content On Mobile For VC Tours
- css Alter The Width Of The VC Tour Module Tabs & Content
- php Re-add Visual Composer Welcome/About Screen
- php Disable the WPBakery Page Builder Front-End Editor Completely
- php Switch Visual Composer Front End Editor HTTPS Protocol
- php Hide Visual Composer Settings From Specific Users
- css Keep Visual Composer Tabs as “Tabs” on Mobile
- php Add Fonts to The Total VC “Heading” Module
- php Alter The Milestone VC Module Decimal Format
- php Alter The Default Title Tag For Total Grid VC Modules
WooCommerce
- php Change WooCommerce “Out Of Stock” Text
- php Alter WooCommerce Menu Cart Icon HTML
- php Alter WooCommerce Placeholder Image HTML
- css Hide WooCommerce Product “Add To Cart” Button
- css WooCommerce Category Entry Overlay Title
- html WooCommerce Add To Cart Link
- php Add Videos To WooCommerce Products
- php Remove “Cart” from breadcrumbs
- php Alter The WooCommerce Single Product Add To Cart Text
- php Change The WooCommerce Onsale Text
The Events Calendar
- php Exclude Events From Search Results
- php Altering The Event Calendar Page Layouts
- php Disable the Tribe Events Calendar Plugin Post Image
- php Add Social Sharing On The Events Calendar Plugin Events
- php Display Past Events in Total VC Modules for the Events Calendar Plugin
- php Exclude Passed Events (Events Calendar Plugin) from Total Modules
- php Exclude Past Events (Tribe Events Calendar) from Theme Grids/Carousels
Design Tweaks
Responsive
- css Move Mobile Menu Under Logo
- css Place Mobile Toggle Menu Under Logo
- php Close VC Tabs First Active Tab on Mobile Devices
- css Disable CSS Animations on Mobile
- css Display Self-hosted Video Backgrounds for Mobile Devices
- php Add New Widget Area Above Content on Mobile
- css Remove Focus Styles from The Mobile Menu & Mobile Menu Toggle
Featured Images
- php Display Thumbnail Above Title For Pages
- php Custom Post Type Image Sizes
- php Disable Term (Category) Page Header Images When Adding a Thumbnail
Next & Previous Post Links
- php Next/Previous Links NOT From Same Category
- php Move Next/Previous Links To The Top Of Posts
- php Disable Next & Previous Post Links
- php Reverse Next/Previous Post Links
Sidebar & Widgets
- css Center Font Awesome Social Widget Icons
- php Create Unique Sidebar Template Files
- php Add New Social Options To The Social Links Widget
- php Removing All Custom Widgets
- php Alter The Main Sidebar Display
- php How to Override Custom Widgets
- php Display Custom Sidebar For Specific Page & Child Pages
- css Display Site Labels on Total Social Widget
- php Register A New Custom Sidebar
SEO
- php How To Properly Add Google Tag Manager Code
- php Remove the Yoast Breadcrumbs title
- php Remove Author Links from Post Meta & Author Bio
Social Share
- php Add Query Argument To Social Share Links
- php Replace Total Social Share With Shortcode
- php Create a Shortcode for the Total Social Share
- php Add Social Share To Archives
- php How to Add New Social Share Options
- php Add Facebook “Like” Button to Singular Posts
- php Custom Social Share Email Settings
- php Change Social Share Labels/Text
- php Add Print Button to Social Share
- php Use Custom SVG for Social Share Icon
Optimizations
- php How To Remove Script Version Numbers
- php Custom Google Font Lists
- php Add Version Number to Child Theme to Prevent Browser Cache
- php Remove the easing script
Advertisements
Videos
Extensions
LearnDash Plugin
3rd Party Compatibility
- css VC Support For “Lazy Load for Videos” Plugin
- php Remove Certain Plugins From Recommended Plugins List
User Access
bbPress
Widgets
Development
- php Adding Your Own Accent Elements
- php Set Default Customizer Settings Via Child Theme
- php Hide Visual Composer Settings From Specific Users
- php Add Custom Button Styles
- php Alter Any Theme Template Part via Callable Function or Custom File
- php Hide Blog Date & Add Page Setting to Conditionally Enable It
- php Insert Template Content via Theme Hooks
- php Basic Page Template Code
- php Alter Editor Shortcodes Insert Button Default Value
- php Get & Display Term Thumbnail
Other
- php Disable WordPress SEO by Yoast Page Analysis
- php Re-Order Social Sharing Sites
- css Change The Theme Heading Border Color
- php Better RSS Feeds (Removes Shortcodes & Displays Thumbnail)
- php Add “nocookie” To WordPress oEmbeded Youtube Videos
- css Alter The Image Width In The 1 Column Left Image & Right Content Grid
- css Remove Text On Post Social Share Icons
- php TagCloud With Different Font Sizes
- php Disable URL Hash Update For Local Scroll Links
- css Make Page Content Background Transparent for Boxed Layout