Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #541839

    Hello,

    I’m trying to add class for the <article> into the loop for archive page.
    But I can’t find witch template it is.

    Could you tell me ?

    Carosch

    #541994

    Hi carosch!

    Try line 87 in the /enfold/includes/loop-index.php file.

    Cheers!
    Elliott

    #542070

    Hi Elliott,

    I added a class, line 87, but nothing happens

    Carosch

    #544770

    Hey!

    can we please have access to your web site, so we can check the issue?
    Thanks a lot!

    Best regards,
    Basilis

    #546171

    Hello,

    in private, the access code

    the url to an archive page, to see my problem.

    My goal:
    add a different class if the archive content belong to a category or another.

    I made that to replace the first echo

    <?php
    // case #1 : the archive belongs to the parent category 'museecollections' and childs
    if ( in_category( 'museecollections' ) ||  in_category( 'le-musee' ) ||  in_category( 'la-visite' ) ||  in_category( 'les-objets-emblematiques' ) ||  in_category( 'equipe' )) {
    	echo "<article class='".implode(" ", get_post_class('blocs-archive-musee post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)). ">";
    } 
    
    // case #2 : the archive belongs to the parent category 'espace-pedagogique' and childs
    elseif ( in_category( 'espace-pedagogique' )) {
    	echo "<article class='".implode(" ", get_post_class('blocs-archive-pedago post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)). ">";
    } 
    
    // case #2 : the archive belongs to the parent category 'preparer-sa-visite' and childs
    elseif ( in_category( 'preparer-sa-visite' )) {
    	echo "<article class='".implode(" ", get_post_class('blocs-archive-visite post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)). ">";
    } 
    
    // dans le cas où le post appartient à aucune categories et est donc dans l'agenda
    else {
    	echo "<article class='".implode(" ", get_post_class('blocs-archive-agenda post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)). ">";
    }
    ?>

    but nothing I write in loop-index.php make any visual difference.
    like if this is not the page witch is use for the archive

    Carosch

    #547166

    Hi,

    I try to suppress all the code into includes/loop-index.php
    and that change nothing
    Is it possible that it is not the includes/loop-index.php that is use in the archive page?

    carosch

    #549449

    Hey!

    Your login is not working for me, can you check it?

    Try adding it in like this.

    echo "<article class=' here-is-a-test-class ".implode(" ", get_post_class('post-entry post-entry-type-'.$post_format . " " . $post_class . " ".$with_slider))."' ".avia_markup_helper(array('context' => 'entry','echo'=>false)).">";
    

    Regards,
    Elliott

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.