• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

PopWP

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Customize Post Meta conditionally in Genesis

Last Updated on November 28, 2018 Favorited: 1 times

You can customize the ENTRY FOOTER Meta containing post meta for Blog, Post, Page, Custom posts types, archives and more Conditionally using the benefits of WordPress Conditional Tags.

The snippet will be added at the end of functions.php

Default

The Global settings can be made for post meta using this

//* Customize the entry meta in the entry footer.
add_filter( 'genesis_post_meta', 'gk_post_meta_filter' );
function gk_post_meta_filter($post_meta) {
	$post_meta = 'Filed Under: Genesis Tutorials, Premium Content, WordPress Tutorials Tagged With: conditional tags, Post meta';
	return $post_meta;
}

Post Page

You can output a different post meta on Blog i.e post page using this

add_filter( 'genesis_post_meta', 'gk_remove_post_meta_conditionally' );
/*
* Post meta on BLOG page.
*/
function gk_remove_post_meta_conditionally($post_meta) {
	if ( is_home() ) {
		$post_meta = 'Post Page Post Meta';
	}
	return $post_meta;
}

Custom Post Types

To view the full content, please sign up for the membership.

Already a member? Log in below or here.

 
 
Forgot Password

Related Posts

  • Conditional Tag is_front_page() v/s is_home(). What to use?
  • Add Custom Body Class in Genesis
  • Customize entry Footer Entry Meta (Post Meta) in Genesis
  • Conditional site footer in Genesis
  • Replace site footer widget area conditionally in Genesis

Categories: Genesis Tutorials, Premium Content, WordPress Tutorials Tags: conditional tags, Post meta

Primary Sidebar

Search

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service