A client of ours wanted to disable the comment avatars on her blog and initially we thought that simply taking the tick out of setting “Avatar Display” would do it. However that disabled all avatars including the avatars in the author box and the Genesis user profile widget, not what we wanted. So we had Disable Comment Avatars in Genesis[Read More]
Code Stuff
We like to share things we learn with other web developers. Here are just a few tips we figured out on our way.
Exclude tag from the WordPress tag cloud widget
Ever wanted to exclude a tag from the tag cloud but there’s no option in the widget? Well in wp-includes/widgets/class-wp-widget-tag-cloud.php there is a filter called widget_tag_cloud_args you can use.
Add Line Break to Site Description in Genesis
For a client’s site I need the site description to break on to a second line at a specific point. I tried putting a <br /> where I wanted the line break in Settings > General > Tagline but this outputs the characters <br /> rather than the line break. This is because the genesis_seo_site_description function in Add Line Break to Site Description in Genesis[Read More]
Customising Comment Date in Genesis 2.2
In the Genesis Slack Group ( #code-snippets channel) Brian Bourn mentioned a new filter in Genesis 2.2 that allows you to customise the comment meta data. And right there on lines 317 – 333 in the genesis/lib/structure/comments.php file is: <?php /** * Allows developer to control whether to print the comment date. * * @since 2.2.0 Customising Comment Date in Genesis 2.2[Read More]
An Introduction to Genesis Action and Filter Hooks
Wow. Genesis Camp this weekend was awesome, wasn’t it? If you missed anything you can catch up with all the videos on the Genesis Camp Sessions page. I presented a talk entitled “How do you find the hook you need?” and it covers: What is a hook? What is an action hook? What is a filter An Introduction to Genesis Action and Filter Hooks[Read More]
How to add a category page title before posts
I want to add a title above a loop of posts, but only if there are posts. In my project I’m using the genesis_custom_loop because I want to output a custom post type by author, but the issue, and solution, is the same if you are using the genesis_standard_loop. My usual process is to check How to add a category page title before posts[Read More]
Add content before footer widgets wrap closure
To give you extra flexibility with styling your child theme the Genesis Framework gives us Structural Wraps which you can add support for using the code: add_theme_support( ‘genesis-structural-wraps’, array( ‘header’, ‘nav’, ‘subnav’, ‘site-inner’, ‘footer-widgets’, ‘footer’ ) ); But every now and then you want to add something between the wrap and the code you are wrapping. In Add content before footer widgets wrap closure[Read More]
Display Advanced Custom Fields Gallery as an Envira Gallery
I’m working on a site for a client where there are products with lots additional data. We are using Advanced Custom Fields Pro to enter and display this additional information. There are also extra images which need to be displayed in a gallery format. The ACF plugin has a gallery field type and using that I can create the WordPress built in gallery Display Advanced Custom Fields Gallery as an Envira Gallery[Read More]
Setting the search results page to use the Foodie Pro grid
I recently implemented the Foodie Pro theme on Elizabeth’s Kitchen Diary website. It is a lovely minimalist theme, designed with food bloggers in mind, and has quite a few options for the display of your content. In particular we like the Foodie Pro grid you can use on your category archive pages such as this archive Setting the search results page to use the Foodie Pro grid[Read More]