Each page (first and subsequent paginated pages) of Posts page in WordPress shows the same number of posts as set for “Blog pages show at most” setting. If you want to display a different number of posts on the first page this can be done by specifying posts_per_page for non/paginated page(s) in a function hooked […]
Free Content
Importing a sql file into DesktopServer powered local site using command line in Mac
In certain situations importing a large sql file into a database in phpMyAdmin may fail/timeout. The better alternative is to run the mysql command in terminal. This is extremely fast (importing a 320 MB .sql file took just 1 second in my testing). If you are on a Mac, the location of mysql installed by […]
How to display Author Box on all pages of author archives in Genesis
In Genesis Slack chat a user asks, I just noticed that when you click an Author name on a post which takes you to the Author Archive, if there is more than one page – the Author box isn’t on page 2, 3, etc. Is there a way to get the Author box to show […]
How to add a full width element inside Genesis header
In Genesis Slack chat, a user asked: Has there ever been talk of creating a Genesis hook between a container class and the wrap that’s within that container? For example, a hook that is just after the opening markup for <header> but before the <div class=”wrap”>. This would easily allow for a full width div […]
Subtitles below Titles in Genesis using Visual Subtitle plugin
Cami asks, @srikat Hi Sridhar! I'm trying to figure out how to add subtitles directly under page titles in Interior Pro (over image area). Any ideas? — Cami MacNamara (@WebCami) June 1, 2016 Subtitles can easily be added using Gary Jones’ Visual Subtitle plugin which adds a Visual Subtitle field to all post, page and […]
How to enable Author Box in Genesis on single entries of ‘post’ type only
Adding in functions.php when using Genesis will enable the author box for all users on single entries of all post types (standard blog posts, Custom Post Type entries etc). If you want it to be displayed only on single blog post pages but not on single pages of other post types, change the above code […]
Force a layout for Pages that have subpages in Genesis
Andy asks Hey @UKGenesis @GenesisWPguide #genesiswp: how do I change layout based on if page is a parent or has children? Any ideas?? — Andy Moore (@that_web_guy) May 27, 2016 Adding the following in child theme’s functions.phps will apply content-sidebar layout to all static Pages that have children and overrides the default layout set in […]
Multiple Loops in Genesis
In this article I share sample code of a Page Template which adds a new section below the existing content. The new section displays two loops: three entries from portfolio CPT six regular posts tagged project Create a file named page-slug.php where slug is your static Page’s slug. In this example, the Page title is […]
How to remove Posts page heading in Genesis
Have a static Page set as Posts page at Settings > Reading in your Genesis powered WordPress site? If you want to remove the Page title inside .posts-page-description, just add the following in your child theme’s functions.php: remove_action( ‘genesis_before_loop’, ‘genesis_do_posts_page_heading’ ); Before: After: Source: genesis/lib/structure/archive.php
How to automatically add browser class to html in WordPress
Quoting MDN, Note: It’s worth re-iterating: it’s very rarely a good idea to use user agent sniffing. You can almost always find a better, more broadly compatible way to solve your problem! That out of the way there are certain situations where you need to have the browser name automatically added to html/body element in […]
Recent Comments