Website Tutorial How to Create & Customize a Child Theme on WordPress
Creating and customizing a child theme in WordPress is a good practice to ensure that your customizations are preserved when the parent theme receives updates. Here’s a step-by-step guide to create and customize a child theme: Step 1: Create a Child Theme Directory Create a new directory: Navigate to your WordPress installation’s wp-content/themes/ directory via…
Website Tutorial WordPress functions.php-Add Featured Images
As with sidebars and navigation menus, we can’t just output featured images in our theme and expect them to work, we must first tell WordPress that we support the feature. In functions.php add: add_theme_support( ‘post-thumbnails’ ); Now we can add_post_thumbnail(); in our loop and the thumbnails will work. The problem is that they will be…
Website Tutorial WordPress functions.php-Add a Sidebar
Adding a Sidebar Our theme also doesn’t have a sidebar (widget area), let’s fix that now. First, we need to register the sidebar in functions.php: function my_custom_theme_sidebar() {register_sidebar( array( ‘name’ => __( ‘Primary Sidebar’, ‘my-custom-theme’ ), ‘id’ => ‘sidebar-1’,) ); } add_action( ‘widgets_init’, ‘my_custom_theme_sidebar’ ); Now create sidebar.php in your theme folder and add the…
Website Tutorial WordPress-Create functions.php Add a Navigation Menu
Functions.php is not strictly a required file, but it provides so many benefits that 99.99% of themes have it. In functions.php, you can take advantage of WordPress’ built-in theme functionality and also add your own custom PHP code. Now create a functions.php in your theme folder, as we will be adding code to it in…
Website Tutorial WordPress Customize the theme to create basic files-index.php
index.php is a strictly required file. Its job is to render all of our theme’s front-end output. Since index.php will render all of our pages (home, posts, categories, archives), it will do a lot of work. First, we need a head section that covers the basics of HTML. <!DOCTYPE html> <html <?php language_attributes(); ?>> <head><meta…
Website Tutorial WordPress Customize the theme to create basic files-Style.css
In /wp-content/themes/, create a folder called my-custom-theme and create the following two files: style.css In order for WordPress to recognize our theme and output it correctly in the Appearance → Theme list, we need to put some WordPress specific code at the top of style.css, like this: /* Theme Name: My Custom Theme Theme URI:…
Website Tutorial How To Track Buttons With Google Tag Manager
Tracking buttons with Google Tag Manager (GTM) involves a few steps to set up tags, triggers, and variables. Here’s a step-by-step guide on how to track button clicks using GTM: Step 1: Set Up Google Tag Manager Create an Account and Container: Go to Google Tag Manager and sign in with your Google account. Create…
Website Tutorial Generic Button Click Trigger in Google Tag Manager
Firstly we want to add a generic button click trigger, so we can track all clicks on the page. (I am assuming you have already got GTM on your page. If not, follow these instructions) Follow these simple steps to implement… On the workspace tab, on the left-hand menu, select “Triggers”. Click “New”. Select “Click –…
Website Tutorial Regex Fundamentals for Google Tag Manager
Regex symbols, also known as regular expressions, are special characters with unique meanings that allow developers to create complex patterns for matching specific sequences of characters in a text string. Understanding and mastering these symbols is crucial for writing efficient and effective regular expressions. This article will cover commonly used regex symbols, including the pipe…