Add a Different CSS Body Class to a Page in WordPress
Using WordPress filter ‘body_class‘ you can add a unique CSS class to the body element of a page by passing in what pages you want the new CSS class applied…
Read MoreAdding a centered horizontal submenu in Genesis Theme
…guide uses the latest Genesis Sample theme CSS. So going from this… to this… There are only 5 CSS selectors to edit, you can either paste in the…
Read MoreUsing ScrollNav to control long documents in WordPress
…as doing just .post may also target the sidebar content. So all posts would be: jQuery(‘.content .post’).scrollNav(); Add this content to a new script which will trigger the jQuery and…
Read MoreViewing and Changing WordPress Default Permissions
…not write, the execute access allowing users to move into the directory. You can view the permissions via the command line in your WordPress webroot by running… ls -la Giving…
Read MoreReplacing the default ServerPilot Firewall with your own using UFW
ServerPilot comes with a default firewall enabled when you connect to a droplet instance such as from Vultr or Digital Ocean, the only option you have from the ServerPilot control…
Read MoreList all WordPress Custom Post Types in a Menu
…the WP query $args = array( ‘post_type’ => ‘custom-post-type-name’,//Swap in your CPT ‘posts_per_page’ => -1, ); $query = new WP_Query( $args ); if ($query->have_posts()) { // Output the post titles…
Read MoreUpload SVG Images to WordPress Media Library
…a new format but been around since 1999, but has taken time to be adopted by web standards and various browsers. Now it can be safely used across all devices/browsers…
Read MoreSwitching Primary Menu in Genesis Theme to Header Right on a Permanent Basis
…You can actually just add the remove_action and add_action functions at the beginning of the code and that alone will reposition the menu. The remove_action moves the menu away completely…
Read MoreCustom Genesis Loop on Blog Archive Page
…blog page is selected with is_home, the genesis_do_loop is removed and a new loop wpb_change_home_loop is inserted. The core markup for the genesis_do_loop is found in the framework at /lib/structure/loops.php…
Read MoreWhat is a reference assignment in PHP?
…= new MyExample(); $blackboard->method_inside_example(); $blackboard->hello(); So an instance is made of the class $blackboard -then it calls 2 methods, the first one outputs the class name in the method_inside_example method…
Read More