Add icon to blogroll widget links This snippet customizes the html output of the blogroll links widget. In this example we...
Programmatically add widgets to sidebars Build a theme and programatically and auto-set widgets to your defined sidebars. Your users get...
Add admin script on custom post types if you require a specific javascript file enqueued only on pages related to your custom...
Check if post has a gallery A simple check if the current post\page has a gallery shortcode within the post_content. Show...
Load script on custom page template This snippet loads a custom javascript file only if a conditional tag is true. In...
Add menu link to custom menu locations Manually add menu links to a custom menu location with this snippet. Adjust your menu...
Echo post content by post ID If you need to get content from a specific page or post in your template...
Add bootstrap classes for WP tables Bootstrap requires custom table classes. If a table is added to the_content this function with...
Exclude sticky posts from main query Sticky posts are intended to be on top. This function excludes them from the main...
Hide VIEW button on post edit screen for custom post types Remove the VIEW button in your post edit screen. Choose the custom post type where...