Check Page Level Depth If Condition in WordPress

The code snippet below is handy when you are trying to check if the current page is a parent or a child in a WordPress theme. You can then use the conditional to output different code depending on the page depth it is

Source: Get the depth of the current page in WordPress

Continue Reading

Category: Code Snippets

HTML5 Responsive Autoplay Video Code Snippet

In order to make your HTML5 video responsive you will need to add the following CSS style properties: width: 100%, and max-height: 100%.

Continue Reading

Category: Code Snippets

Hide WordPress Content Editor Panel Using ACF

Add the code snippet below into your functions.php file to hide the default WordPress content meta box. Source

Continue Reading

Category: Code Snippets

Close Navbar When Nav Link is Clicked

By default the navbar dropdown stays open when clicked. This can be an issue if you are using name anchor’s or linking to an id like href=”#section”

Continue Reading

Category: Code Snippets

Code Comments Hierarchy

 

Continue Reading

Category: Code Snippets

Get URL parameter string – jQuery

 

Continue Reading

Category: Code Snippets

Add class to body based on the URL – jQuery

 

Continue Reading

Category: Code Snippets

Bootstrap 4 Media Queries Tiered Breakpoints [snippet]

Bootstrap 4 introduces a new breakpoint to the grid system XL. Below are the Bootstrap 4 media queries used for the grid system breakpoints for you to add to your projects CSS file to customize things. If you are new to the Bootstrap grid I wrote a post explaining how it works in this post…. Read more »

Continue Reading

Category: Code Snippets

Yoast Breadcrumbs CSS Styles for WordPress Templates

The Yoast SEO plugin is great and offers a nice breadcrumbs snippet. Unfortunately, there is not an easy way to add a wrapper ID or class to the breadcrumbs for styling. Follow the steps below to change that.

Continue Reading

Category: Code Snippets