Genesis Automatic Term Headline archived
Plugin for Genesis Framework, that automatically adds a headline to the term archive page, the same as the name of taxonomy term, if no explicit value is given.
by Gary Jones · github.com/garyjones/genesis-automatic-term-headline · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/garyjones/genesis-automatic-term-headline/archive/refs/heads/develop.zipDeclares an update source (https://github.com/GaryJones/genesis-automatic-term-headline), so updates arrive through the plugin's own updater.
Readme
Genesis Automatic Term Headline
Automatically adds a headline to the term archive page, the same as the name of taxonomy term, if no explicit value is given.
Description
In Genesis, the headline on the term archive page only appears if a value is given. This plugin changes that behaviour so that the default value is the name of the term itself, instead of an empty string.
The field on the Edit Term page will still be empty, so if you enter a custom headline, this value will be used instead.
Installation
Upload
- Download the latest tagged archive (choose the "zip" option).
- Go to the Plugins -> Add New screen and click the Upload tab.
- Upload the zipped archive directly.
- Go to the Plugins screen and click Activate.
Manual
- Download the latest tagged archive (choose the "zip" option).
- Unzip the archive.
- Copy the folder to your
/wp-content/plugins/directory. - Go to the Plugins screen and click Activate.
Check out the Codex for more information about installing plugins manually.
Git
Using git, browse to your /wp-content/plugins/ directory and clone this repository:
git clone git@github.com:GaryJones/genesis-automatic-term-headline.git
Then go to your Plugins screen and click Activate.
Updates
This plugin supports the GitHub Updater plugin, so if you install that, this plugin becomes automatically updateable direct from GitHub.
Usage
Just activate the plugin, and the term headlines will automatically appear.
Selective Criteria
If you want to be a bit more selective of which taxonomies the plugin affects, you can use the genesis-automatic-term-headline-exclusion filter. It's a boolean filter, where any truthy value will stop the term headline from appearing. To not add the term headlines for post tag archives, for category archives for categories begining with Test, or the archive page for the flavour taxonomy with the slug of mild, for instance, you can do:
add_filter( 'genesis-automatic-term-headline-exclusion', 'prefix_automatic_term_headline_exclusion' );
/**
* Remove automatic term headlines for specific conditions.
*
* @param bool $return Existing value, originally false.
*
* @return bool Return true if the condition should be excluded from showing automatic term headlines, false otherwise.
*/
function prefix_automatic_term_headline_exclusion( $return ) {
if ( is_tag() || 'Test' === substr( single_cat_title( '', false ), 0, 4 ) || is_tax( 'flavour', 'mild') )
return true;
return $return;
}
By returning $return instead of false, you allow more choices from other functions hooked to this filter to be carried through.
Credits
Built by Gary Jones
Copyright 2013 Gamajo Tech
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.