Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • in reply to: Kleo Posts Pagination #104716
     saveorcancel
    Participant

    I couldn’t upload the php

    Here is try #2 posts grid – error on line 120

    COPY CODE
    <?php
    global $kleo_config;
    
    $grid_link = $grid_layout_mode = $title = $filter = $show_thumb = $inline_meta = $show_footer = '';
    $posts = array();
    extract(shortcode_atts(array(
        'title' => '',
        'columns' => 4,
        'el_class' => '',
        'orderby' => NULL,
        'order' => 'DESC',
        'loop' => '',
        'post_layout' => 'grid',
        'show_thumb' => 'yes',
        'show_meta' => 'yes',
        'inline_meta' => 'no',
        'show_excerpt' => 'yes',
        'show_switcher' => 'no',
        'show_footer' => 'yes',
        'switcher_layouts' => array_values(array_flip($kleo_config['blog_layouts']))
    ), $atts));
    
    if( empty( $loop ) ) return;
    $this->getLoop( $loop );
    $my_query = $this->query;
    $args = $this->loop_args;
    
    $el_class = $el_class != "" ? " ".$el_class : "";
    
    // Alias for Grid to Masonry
    if ( $post_layout == 'grid' ) {
        $post_layout = 'masonry';
    }
    $post_layout = apply_filters( 'kleo_blog_type', $post_layout, get_the_ID() );
    
    if ( $post_layout == 'standard' && 0 === strpos( $show_thumb, 'just_' ) ) {
        global $conditional_thumb;
        $conditional_thumb = substr( $show_thumb, -1 );
        $el_class .= ' just-thumb-' . $conditional_thumb;
    } elseif ( $show_thumb == 'no' ) {
        global $conditional_thumb;
        $conditional_thumb = 0;
    }
    
    if ( $show_meta == 'yes' ) {
        $el_class .= ' with-meta';
    } else {
        $el_class .= ' no-meta';
    }
    
    if ( $show_footer == 'no' ) {
        $el_class .= ' no-footer';
    }
    
    if ( $show_excerpt == 'no' ) {
        $el_class .= ' no-excerpt';
    }
    
    if ( $inline_meta == 'yes' ) {
        $el_class .= ' inline-meta';
    }
    
    $el_class .= " " . $post_layout . '-listing';
    
    	query_posts($args);
    
    	if ( have_posts() ) : ?>
    
            <?php if ( $show_switcher  == 'yes' ) : ?>
    
                <?php
                $switcher_layouts = explode( ',',$switcher_layouts );
                kleo_view_switch( $switcher_layouts, $post_layout, get_the_ID() );
                ?>
    
            <?php endif; ?>
    
            <?php if ( $post_layout == 'masonry' ) : ?>
    
                <div class="posts-listing responsive-cols kleo-masonry per-row-<?php echo $columns;?><?php echo $el_class;?>">
    
            <?php else: ?>
    
                <div class="posts-listing <?php echo $el_class;?>">
    
            <?php endif; ?>
    
            <?php
            while ( have_posts() ) : the_post();
    
                if ( $post_layout != 'standard' ) {
                    get_template_part( 'page-parts/post-content-' . $post_layout );
                } else {
                    get_template_part( 'content', get_post_format() );
                }
    
            endwhile;
            
            if ($post_layout == 'masonry') : ?>
    	<?php endif; ?>	
    
    	<?php
    	
    	// Post navigation.
    	kleo_pagination();
    
    else :
    	// If no content, include the "No posts found" template.
    	get_template_part( 'content', 'none' );
    
    endif;
            ?>
    
            </div> <!-- END post listing -->
    
    <?php
    endif;
    // Reset Query
    wp_reset_query();

    try #4 @ vc posts grid – error – line 118

    COPY CODE
    <?php
    global $kleo_config;
    
    $grid_link = $grid_layout_mode = $title = $filter = $show_thumb = $inline_meta = $show_footer = '';
    $posts = array();
    extract(shortcode_atts(array(
        'title' => '',
        'columns' => 4,
        'el_class' => '',
        'orderby' => NULL,
        'order' => 'DESC',
        'loop' => '',
        'post_layout' => 'grid',
        'show_thumb' => 'yes',
        'show_meta' => 'yes',
        'inline_meta' => 'no',
        'show_excerpt' => 'yes',
        'show_switcher' => 'no',
        'show_footer' => 'yes',
        'switcher_layouts' => array_values(array_flip($kleo_config['blog_layouts']))
    ), $atts));
    
    if( empty( $loop ) ) return;
    $this->getLoop( $loop );
    $my_query = $this->query;
    $args = $this->loop_args;
    
    $el_class = $el_class != "" ? " ".$el_class : "";
    
    // Alias for Grid to Masonry
    if ( $post_layout == 'grid' ) {
        $post_layout = 'masonry';
    }
    $post_layout = apply_filters( 'kleo_blog_type', $post_layout, get_the_ID() );
    
    if ( $post_layout == 'standard' && 0 === strpos( $show_thumb, 'just_' ) ) {
        global $conditional_thumb;
        $conditional_thumb = substr( $show_thumb, -1 );
        $el_class .= ' just-thumb-' . $conditional_thumb;
    } elseif ( $show_thumb == 'no' ) {
        global $conditional_thumb;
        $conditional_thumb = 0;
    }
    
    if ( $show_meta == 'yes' ) {
        $el_class .= ' with-meta';
    } else {
        $el_class .= ' no-meta';
    }
    
    if ( $show_footer == 'no' ) {
        $el_class .= ' no-footer';
    }
    
    if ( $show_excerpt == 'no' ) {
        $el_class .= ' no-excerpt';
    }
    
    if ( $inline_meta == 'yes' ) {
        $el_class .= ' inline-meta';
    }
    
    $el_class .= " " . $post_layout . '-listing';
    
    	query_posts($args);
    
    	if ( have_posts() ) : ?>
    
            <?php if ( $show_switcher  == 'yes' ) : ?>
    
                <?php
                if(!is_array($switcher_layouts)){
                    $switcher_layouts = explode( ',',$switcher_layouts );
                }
                kleo_view_switch( $switcher_layouts, $post_layout, get_the_ID() );
                ?>
    
            <?php endif; ?>
    
            <?php if ( $post_layout == 'masonry' ) : ?>
    
                <div class="posts-listing responsive-cols kleo-masonry per-row-<?php echo $columns;?><?php echo $el_class;?>">
    
            <?php else: ?>
    
                <div class="posts-listing <?php echo $el_class;?>">
    
            <?php endif; ?>
    
            <?php
            while ( have_posts() ) : the_post();
    
                if ( $post_layout != 'standard' ) {
                    get_template_part( 'page-parts/post-content-' . $post_layout );
                } else {
                    get_template_part( 'content', get_post_format() );
                }
    
            endwhile;
            ?>
    
            </div> <!-- END post listing -->
    <?php
    	
    	// Post navigation.
    	kleo_pagination();
    
    else :
    	// If no content, include the "No posts found" template.
    	get_template_part( 'content', 'none' );
    
    endif;
    ?>
    
    <?php
    endif;
    // Reset Query
    wp_reset_query();
    in reply to: Kleo Posts Pagination #104712
     saveorcancel
    Participant

    Thank you for your answer, Andrei.

    The screenshot is the error, as it was on the site.
    I wouldn’t go through all this hassle but the thing is – I can’t get the demo page (home pinterest – http://feeder.ro/home-pinterest) to load “All” our posts, it just times out. If pagination was available in this page element, we could display a certain number of posts per page.

    I’ve attached the modified post grid – #2 – error on line 120
    I’ve also attached a new try at the vc posts grid – #4 – error – line 118 endif

    We won’t use multiple grids on one page, we are setting up custom pages for the site’s categories, and we wanted the pinterest home style. The other vc available grids look totally different.

    Thank you,
    Cristiana.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Kleo Posts Pagination #104674
     saveorcancel
    Participant

    Hello again, Radu!

    I copied the pagination from index (the post navigation) and pasted it on posts grid but I have an error that refers to ”endif” on the line 120. I will attach a screenshot of the code.

    Do you know how can I fix that error? Do you think the pagination will work this way?

    Thank you again!

    Attachments:
    You must be logged in to view attached files.
    in reply to: Kleo Posts Pagination #104094
     saveorcancel
    Participant

    Thank you, Radu!

    I already konw about that option (Post Grid) but the design of the grid is different from the one on the homepage.

    I would like to have the same structure, with the same design and pagination. Is that impossible? The only way to make them look alike is by adding custom css?

    Thank you!

    in reply to: Kleo Post issues #100011
     saveorcancel
    Participant

    Thank you for your quick answer!

    On the homepage, the page numbers appear but not on any other page. For example, the page http://www.feeder.ro/home-pinterest/ imports the demo data from kleo with kleo posts set to ”display all” but the page is blank.

     saveorcancel
    Participant

    Wow! Mulțumesc. Worked like a charm. 😀

    Dacă vreau să te întreb alte lucruri, marchez topicul acesta “solved” și deschid alte discuții sau îți scriu aici, în continuare?

     saveorcancel
    Participant

    Mulțumesc, Radu. 🙂

    Nu întrebam cum să trimit pingbacks & trackbacks altor site-uri, ci cum fac să apară cele primite de site-ul nostru în zona comentariilor, acolo unde le vedeam în vechea temă.

    Am setat totul corect, le văd numărul, dar nu și pe ele în comentariile unui articol.
    https://www.greengeeks.com/kb/wp-content/uploads/2015/09/pingback.jpg

Viewing 7 posts - 1 through 7 (of 7 total)

Log in with your credentials

Forgot your details?