Grégoire Noyelle

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: different image size on single custom post type #133105

    Grégoire Noyelle
    Participant
    Post count: 39

    Hi

    It will easier if you add all your URL in the post :)
    For the first point, you can reset all the padding for the single and add again except for the img.
    I don’t know you’re plugin (URL?) but it will be easier to add featured image with a hook. You have more control and you avoid this kind of CSS problems.
    I do recommend the Genesis Visual Hook plugin to find the right place.

    Cheers
    Grégoire

    in reply to: Make pagingation works on custom post type archive #128298

    Grégoire Noyelle
    Participant
    Post count: 39

    Thanks @Nick . You give me the idea about pre_get_posts :-)
    It’s opens so many possibilities about CPT archive page with a clean URL

    in reply to: Make pagingation works on custom post type archive #128281

    Grégoire Noyelle
    Participant
    Post count: 39

    Hi
    I find the solution. It works great even if the setting for archive is more important than the number of CPT.
    I hope It can help.

    Here is the solution:

    For the CPT (gnpost_evenement) archive page (archive-gnpost_evenement.php) I put:

    
    
    <?php
    // custom loop for cpt archive
    
    remove_action( 'genesis_loop', 'genesis_do_loop');
    add_action('genesis_loop','gn_loop_event');
    function gn_loop_event() {
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	$args = array(
    		'post_type' => 'gnpost_evenement',
    		'orderby' => 'title',
    		'order' => 'DESC',
    		'paged' => $paged
    	);
    	global $wp_query;
    	$wp_query = new WP_Query( $args );
    
    	if (have_posts() ) :
    		while ( have_posts() ) : the_post();
    			$boucle = new BBPostEvent('event-grid');
    
    		endwhile;
    		do_action( 'genesis_after_endwhile' );
    		wp_reset_query();
    	endif;
    
    } // function gn_loop_event()
    
    genesis();
    
    

    The difference here is that I do not put the posts_per_page parameter. For that I use a plugin OR the functions.php to make some filter. To make it works, you have to fire up this before caling the template file.

    
    
    // Filter for custom post type gnpost_evenement
    add_filter( 'pre_get_posts', 'gn_event_archive_filter' );
    function gn_event_archive_filter( $query ) {
    	if ( $query->is_post_type_archive( 'gnpost_evenement' ) ) :
        	$query->set( 'posts_per_page', 4 );
        endif;
    }
    
    

    Special thanks to @david-decker, @Nick and @genwrock

    in reply to: Make pagingation works on custom post type archive #128269

    Grégoire Noyelle
    Participant
    Post count: 39

    thanks @genwrock I try but it change nothing.

    I make some other tests today.

    * I swich to genesis sample to be sure to not influence the theme with other actions
    * I add the same archirve-$posttype.php with custom in genesis sample (all the CPT are made with a home made plugin)
    * I try pagination as before and I get the same bugs. 404, problem if Settings > Reading > number is more important thant the total of CPT
    * If I remove the custom loop, everything is normal

    I don’t know if this is a Genesis Bug or WordPress one. But that anoying.

    It will be ok, if I can use a page with the same slug (thant the cpt archive) to make a custom loop. But as I said, If I delete the archirve-$posttype.php, that’s the index.php which have stronger priority.

    in reply to: Make pagingation works on custom post type archive #128250

    Grégoire Noyelle
    Participant
    Post count: 39

    I try to make a page with a custom template with the same loop and the same slug as CPT gnpost_evenement.
    But even, if I delete the file archive-gnpost_evenement.php (archive-$posttype.php) the theme take the index.php file as template and note the page :-(

    in reply to: Make pagingation works on custom post type archive #128246

    Grégoire Noyelle
    Participant
    Post count: 39

    Good catch Nick. Thanks a lot to take the time for that.
    I try, and it change nothing. The only case which works perfect is when I set up Settings > Reading > Blog pages show at most to “1″
    Not really usefull for all the other archive page.

    in reply to: Make pagingation works on custom post type archive #128138

    Grégoire Noyelle
    Participant
    Post count: 39

    With a custom template and the exact same $wp_query, I have no problem at all but for me the URL result is just so “bad” and you need a blanck page.
    What a shame like genesis support genesis-cpt-archives-settings

    in reply to: Make pagingation works on custom post type archive #128136

    Grégoire Noyelle
    Participant
    Post count: 39

    Thanks a lot @Nick

    I just have 20 post on this custom post type and the general setting for Setting > Reading was on 24. You’re right :)
    But to make it works, i have to change the orderby parameter and remove paged parameter and add it again.
    And If I try to put Setting > Reading on 18, the pagination still works except for the last one, I get a 404.

    Finaly It always works if I put Setting > Reading on 1. But that’s not the good solution for all the website archive.

    Really odd. It seems to be very unstable. I hope to find a better solution to handle it.

    in reply to: Make pagingation works on custom post type archive #128130

    Grégoire Noyelle
    Participant
    Post count: 39

    I do think that’s a conflict with the archive-$posttype.php model.

    I made a lot of genesis custom loop in custom template and It works perfect. But now I need to have more logical url and use the custom post type archive model without creating a new page.

    in reply to: Make pagingation works on custom post type archive #128128

    Grégoire Noyelle
    Participant
    Post count: 39

    @david-decker Same result
    @Nick Thanks for the help. That’s the first thing I make :)

    in reply to: Make pagingation works on custom post type archive #128123

    Grégoire Noyelle
    Participant
    Post count: 39

    Hi Dave
    Thanks a lot. Good to see you here :)

    I try but It do not work. And I want to avoid a custom page template for that.
    I wonder if it comes from the archive-gnpost_evenement.php (archive-$posttype.php) template?

    Cheers

    in reply to: Make pagingation works on custom post type archive #128103

    Grégoire Noyelle
    Participant
    Post count: 39

    I forget to mention that the real name of the custom archive page is : archive-gnpost_evenement.php

    in reply to: Theme translations don't work? #87526

    Grégoire Noyelle
    Participant
    Post count: 39

    Hello

    For Child theme two things to do:

    1- in functions.php add:


    load_child_theme_textdomain( ‘theme-name’, get_stylesheet_directory() . ‘/lib-gn/language-theme’ );
    `

    The language-theme is my folder for all po, mo files and the ‘theme-name’ is the localization name.

    2. for your mo and po files, just use this names for french:
    fr_FR.mo
    fr_FR.po

    That’s all
    Cheers

    in reply to: Translating to French the Agency Pro theme #83236

    Grégoire Noyelle
    Participant
    Post count: 39

    All the code snippets are here. The plugins Genesis translation works for
    most of the strings.
    The snippets provide very customizable for each web site without changing .po files like for post info

    in reply to: Translating to French the Agency Pro theme #83077

    Grégoire Noyelle
    Participant
    Post count: 39

    Hello Claude
    The string you’re are talking about comes from Genesis Frameworks
    Normally the plugins Genesis Translation do the right job. I made the french part.
    Cheers
    Grégoire

Viewing 15 posts - 1 through 15 (of 16 total)