As from here I can see you used a parameter on your cat_sub_title() function but I don’t think you echo manually. you just hooking this function. That’s why it’s not working.
Try like this. and there is no need to pass any parameter but if you do please working with that.
add_action('genesis_before_loop', 'cat_sub_title', 5 );
function cat_sub_title() {
$term_id = get_queried_object()->term_id;
$catsubhead = get_term_meta( $term_id, 'cat_headings_cat-sub-heading', true );
if ( is_category() ) {
if ( $catsubhead ) {
printf( '<h2 class="sub-heading">%s</h2>', $catsubhead );
}
}
}
Hope it makes sense.
Related Posts:
- Change Page’s Tag Using functions.php File
- Help making my pagination plugin better
- Having Multiple authors for the same WordPress Plugin
- How can a plugin run a script after being updated in MultiSite?
- File Storage Plugin (For Individual Users)?
- Pass A Value From Outside To A Plugin Variable
- Recommendationf for Quiz Plugin that saves results [closed]
- Add query string to plugin URL
- How to add a privacy-checkbox in comment-template?
- Can plugin variables cause conflict?
- Events plugin for theater (event = performance of a production)
- What are the benefit in adding hook in the init() hook?
- Force [wordpress_social_login] shortcode to display where it is embedded [closed]
- How to hide plugin from WordPress Multisite admin plugin list
- Are Drop-ins harmful for wordpress website?
- Unable to install theme recommended plugins on Multisite
- WordPress URL redirect
- Is it dangerous to install unupdated plugins?
- Where to hook my plugin’s action
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- Accidentally Broke Site (Please Help) [closed]
- Apple push notification doesn’t work
- How to query the custom fields by language?
- Is any gallery plugin available to generate galleries from existing uploaded images? [closed]
- How Do I Figure Out What File(s) to Edit from Looking at the Source Code [closed]
- Any recommendation on how to manage ads?
- List taxonomy terms for post as checkboxes
- Plugins not showing in Multisite dashboard
- How to create an archive page (with links) for a date range?
- Change permalinks of custom post type ‘question’ as post id or any random number once
- Why Is This Code Causing The Admin Bar to Disappear?
- WordPress stripping away backslashes from HTML
- Displaying Custom Sidebar Without Modifying Theme’s Core File?
- How to upload multiple files/images when developing a wordpress plugin?
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- How to apply next/previous classes to LIs for pagination links?
- Socialite WP plugin, unable to obtain API keys from FB
- Choose which plugin to run based on user?
- WordPress reliability
- Include a php file from another plugin
- How to create wordpress widget that is fixed position on the home page
- Too many login attempts
- Can the uniqueness of the plugin file/plugin slug and version number be trusted?
- How can I redirect some pages to new subdomain? [closed]
- How can I fetch data from another website to my wordpress website with mysql database
- How to translate WP Blog (search, category etc.)?
- How can I concatenate variables to search results title? [closed]
- Switch from wp-cron to a server cron job
- Sending customer an email with link to stripe to make payment
- is it possible to hook every page style?
- translate “load more” button
- Redirect logged in user to somepage on every page view?
- Add the_post_thumbnail_url to a shortcode in function.php
- Override translation of 1 word
- merge wordpress plugins
- quicktag breaking FancyBox plugin on my blog’s front page
- Adding a Tag Parameter / Filter to My Shortcode
- Can’t create new CPTs when menu hidden
- How to write to the plugin’s directory?
- Modify pages widget and make a plugin?
- Ajax call not working in wordpress through a plugin
- Custom plugin places html head content in body
- Navbar affect loading all products
- How to make a Product page without ordering and database
- Codeless random token generation to pass into multiple tracking links in a single page load
- Setting Author on CPT
- HTTP Error upload ( localhost )
- “SyntaxError: Unexpected end of JSON input” in WordPress checkout – how to debug?
- Custom WordPress feed on Apache server returning 304 response for if-modified-since
- RSS Feed on WordPress showing code (hypertext) in articles titles
- Highlight admin menu items that are parent of existing core items
- How to create algorithm for ordering posts in WordPress?
- WordPress Gutenberg How to make TextControl Required?
- Display a number value from mysql query in WP
- Getting all woocommerce products from REST API call in plugin
- the option to delete plugins is not there, I can’t download plugins either
- Cannot install plugins
- How to deprecate a hook used in a plugin?
- how does a plugin get active in wordpress
- How do I run my custom function in my plugin when a wordpress user is deleted?
- Widget logic using woocommerce product category
- Add subemenu option page
- get_permalink is causing a whitescreen
- How to order users alphabetically by name? in plugin UPME
- Unable to Retrieve Setting Value for my Plugin
- WordPress Background Audio – Continous AutoPlay
- How to delete user meta by key
- How to change a specific page to custom page?
- Being notified when some YouTube video in some post becomes unavailable
- Remove ‘Publish to Facebook’ checkbox for Facebook page publish plugin
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- _e in wordpress +
- How to execute init or woocommerce_init only for checkout page
- how to restore wordpress backup(.rar) manually?
- Questions about using Disqus or Jetpack for comments [closed]
- Any plugin/theme available which suits my requirement? [closed]
- Plugins menu not on dashboard
- Free multi dealer rental cars (sign up) [closed]
- is_user_logged_in() undefined at shutdown in plugin context
- What are Seeds? [closed]