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

Designody

WordPress and Genesis Tutorials

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

Remove the default loop in Genesis

Last Updated on August 26, 2019Leave a Comment Favorited: 0 times

This will remove loop genesis content. This will work for all post and pages and not recommended.Use this in child-theme/functions.php using conditional tag.

//* Remove the default loop
remove_action( 'genesis_loop', 'genesis_do_loop' );

Here is the recommended way. This will remove the loop for non-logged users.

add_action('genesis_header', 'dy_my_custom_loop', 15);
 function dy_my_custom_loop(){
	if ( ! is_user_logged_in()  ) {

		//* Remove the default loop
		remove_action( 'genesis_loop', 'genesis_do_loop' );
	}

}

 

Categories: Free Content, Genesis Tutorials Tags: genesis_loop

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You should use these Shortcodes tag and attributes while sharing the code:
Example: [html]I <3 HTML[/html] → [html][css][php][js][java][json][raw]

Primary Sidebar

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 center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout Logo menu navigation Navigation Menu Nav Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Split Navigation Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress

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