Below are the concise steps to change WordPress database tables’ prefix to prefix_ after WordPress has been installed with the tables having the default wp_ prefix. In the instructions below, replace prefix_ with whatever is your desired prefix (do not use upper case). Step 0 Take a full backup of your site and the database. […]
Search Results for: wordpress
How to setup sticky elements on scroll in WordPress using Stickybits
In the past, I’ve written about using Sticky-Kit to stick elements as they are scrolled past. In this tutorial I show how Stickybits can be used for the same, specifically to make the primary nav sticky for screen widths > 1023px in Genesis Sample. While the tutorial has been written for Genesis Sample, it should […]
How to add categories and tags as body classes in WordPress
In the members-only forum, a user wanted to know how to automatically add slugs of both categories and tags to the existing list of body element’s classes in WordPress. Adding the following in child theme’s functions.php will automatically add categories and tags as body classes in WordPress on single pages (other than static Pages). To […]
Before and After Slider in WordPress using ZURB TwentyTwenty
TwentyTwenty is a jQuery plugin from ZURB that can be used to show multiple sets of before/after images with the images appearing superimposed on each other. Dragging a vertical bar horizontally left and right reveals the before and after image respectively. In this tutorial, we shall load the files needed for ZURB TwentyTwenty draggable before-after […]
How to set up WordPress Coding Standards in Visual Studio Code
I am slowly moving away from Sublime Text to Microsoft’s Visual Studio Code due to VS Code’s superior feature-set like a built-in file navigation tree (which is better than ST’s SideBarEnhancements package), IntelliSense and built-in Git. Below are the steps to have VS Code automatically sniff and display warnings/errors (if any) in your PHP files […]
How to set up Font Awesome icons above menu items in WordPress
In the comments section of How to display custom menu with menu descriptions and icons in a WordPress widget, a user asked: How would I position them? I’ve replicated what you did in the tutorial, but I can’t get the icons above the text using CSS. Thanks for your help! We can automatically generate CSS […]
How to automatically add item label as a class for nav menu items in WordPress
Updated on July 08, 2017 Let’s say you have a nav menu in your WordPress site with these items: Home About Blog Shop Contact In WordPress, it is possible to manually set a class for nav menu items when editing custom menus. Your custom classes can then be used to uniquely style the nav menu […]
How to set up an image link to play video inline in WordPress
One of the tasks in a recent Genesis Customization project that I worked on was to make a Vimeo video play inline (replacing the image) when an image is clicked. Sounds simple, but apparently is not – at least based on my brief googling. In this tutorial, we are going to place the HTML in […]
Using pre_get_posts to set the type of posts appearing on a Tag archive in WordPress
Want to show 2 entries of a journal CPT on economics tag archive page? Add the following in child theme’s functions.php: add_action( ‘pre_get_posts’, ‘sk_change_tag_term_archive_query’ ); /** * Set only Journal CPT entries (two of them) to appear on Economics Tag Archive * * @param object $query data. */ function sk_change_tag_term_archive_query( $query ) { if ( […]
How to order entries by title on Portfolio CPT archive in WordPress
In the members-only forum, a user asked: I use Genesis Portfolio Pro on this site: http://weinschardt.de/portfolio I have tried different Plugins to sort the Portfolio but nothing works. How can I get the Portfolio to sort alphabetically? The default ordering of entries for any post type in WordPress is by published date in descending order. […]
Recent Comments