• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

webmestre-cgmatane

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 6, 2015 at 5:09 pm in reply to: Custom Blog page with pagination #158575
    webmestre-cgmatane
    Member

    I'm trying this code but its not working im kinda lost :

    <?php
    
    //* Template Name: PAGES NOUVELLES (BLOG)
    
    //* The blog page loop logic is located in lib/structure/loops.php
    /** Force full width layout **/
    add_filter ( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
    // Add specific CSS class by filter
    add_filter( 'body_class', 'my_class_names' );
    function my_class_names( $classes ) {
    	// add 'class-name' to the $classes array
    	$classes[] = 'blog';
    	// return the $classes array
    	return $classes;
    }
    
    remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
    add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop
     
    function custom_do_loop() {
    global $post;
    
    	// arguments, adjust as needed
    	$args = array(
    		'post_type'      => 'post',
    		'posts_per_page' => 10,
    		'post_status'    => 'publish',
    		'paged'          => get_query_var( 'paged' )
    	);
    
    	global $wp_query;
    	$wp_query = new WP_Query( $args );
    
    	if ( have_posts() ) : 
    		echo '<ul>';
    		while ( have_posts() ) : the_post(); 
    		?>
    			<article id="" itemscope="itemscope" itemtype="http://schema.org/Article">
    		
    			<div class="one-third first">
    				<a href="" itemprop="thumbnailURL"><img src="" alt="" class="" /></a>
    			
    			</div>
    			
    			<div class="two-thirds">
    			<h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    				<div class="meta"></div>
    				<div class="resume" itemprop="about"></div>
    				<div class="read-more" propname="url"></div>
    			</div>
    		
    			</article>
    		<?php
    		endwhile;
    		echo '</ul>';
    		do_action( 'genesis_after_endwhile' );
    	endif;
    
    	wp_reset_query();
    ?>
    
    <?php
    }
    genesis();
    
    
    July 6, 2015 at 3:39 pm in reply to: Custom Blog page with pagination #158553
    webmestre-cgmatane
    Member

    sorry

    http://imgur.com/U1KvBKk

    I'm looking for a WP QUERY with pagination that could work on /blog page and with archives and categories

    July 6, 2015 at 7:18 am in reply to: Removing Site-inner but div end tag still up? #158491
    webmestre-cgmatane
    Member

    thx for your help but

    When im using genesis-structural-wraps ... a <div class="wrap"> is insered in my <footer></footer> tag

    View post on imgur.com

    is there a way that i can remove this wrap to have my footer full-width like :

    View post on imgur.com

    my child footer.php

    do_action( 'genesis_before_footer' );
    do_action( 'genesis_footer' );
    do_action( 'genesis_after_footer' );
    
    echo '</div><!--END site-container-->'; //* end .site-container or #wrap
    
    do_action( 'genesis_after' );
    wp_footer(); //* we need this for plugins
    ?>
    </body>
    </html>

    my custom-function.php

    // Remove theme support de function.php
     	remove_theme_support ('genesis-structural-wraps', 1 );
     
     	// Modifier Structural Wrap selon la page ou front-page
    	add_action('genesis-structural-wraps', 'setting_site_structural_wrap');	
    	function setting_site_structural_wrap() {
    		$body_classes = get_body_class();
    		if ( is_front_page() || is_page() || is_page_template('templates/programmes.php') || is_page_template('templates/default-page.php') || is_page_template('fullwidth-page.php') ||  is_404() || is_single() ) {
    			$default_arr = array( 'header', 'nav', 'subnav');
    		} 
    		if ( is_page('blog') || $class = 'event-list') {
    			$default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer' );
    		}
    		else {
    			$default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer' );
    		}
    		
    		add_theme_support('genesis-structural-wraps', $default_arr);
    
    	}
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble