Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
webmestre-cgmataneMember
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();
webmestre-cgmataneMembersorry
I'm looking for a WP QUERY with pagination that could work on /blog page and with archives and categories
webmestre-cgmataneMemberthx for your help but
When im using genesis-structural-wraps ... a <div class="wrap"> is insered in my <footer></footer> tag
is there a way that i can remove this wrap to have my footer full-width like :
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); }
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)