• Hi,

    I’ve customized an child theme file starting from Twenty Sixteen template theme archive.php in order to show custom post types posted by wp download manager plugin but not are showing page navigation links. Because I’m improving in a test local site I’m sorry I’m not able to put a screenshot. A kindly template is working whit actually called by a custom shortcode on my child theme file functions.php in accord to every wpdm category posts in my online site with Twenty Thirteen Theme, but I can’t post an URL because it’s in a login protected area.

    Thanks a lot in advance for your help.

    Albert

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Albert A. Garcia Puertas

    (@albertgap)

    I’m adding infomation in order to to help you to help me ??

    My customized shortcode in my child theme functions.php file

    //Add shortocde ‘baixades_coordinadora’ handler
    //Typìng shortocode ‘baixades_coordinadora’ on your post or page content area can be some like that:
    //[baixades_coordinadora cat=’cat’ orderby=’field’ order=’ASCD or DESC’]
    add_shortcode( ‘baixades_coordinadora’, ‘shcd_desc_cat’ );

    //Displays a default category of cpt published status posts of “Baixades” ordered by ‘default’ field and order type ‘default’
    //Its atributtes allows change: category displayed, field order by and order (‘ASCD’ or ‘DESC’)
    function shcd_desc_cat( $atts, $content = null ) {
    $a = shortcode_atts( array(
    ‘cat’ => ‘descarregues’,
    ‘orderby’ => ‘title’,
    ‘order’ => ‘ASCD’,
    ), $atts );

    $args = array(
            'post_status' => 'published',
            'post_type' => 'wpdmpro',
            'wpdmcategory'  =>  $a['cat'],
            'orderby' => $a ['orderby'],
            'order' => $a ['order'],
        );
    
        // The Query.
        $the_query = new WP_Query( $args );
    
        // The Loop.
        if ( $the_query->have_posts() ) {
            while ( $the_query->have_posts() ) {
                $the_query->the_post();?>                          
                <ul>
                    <li>
                        <div>
                            <h5>                            
                                <a href=<?php the_permalink()?> >
                                    <?php the_title() ; ?>
                                </a>
                            </h5>                       
                            <div>
                                <?php                                       
                                    $doc_date = get_post_meta( get_the_ID(), 'Data document',true);
                                    if( ! empty( $doc_date ) ) {
                                        echo '<p>Data document: ' . $doc_date . '<p>';
                                    }
                                ?>
                            </div>
                        </div>
                    </li>
                </ul>
            <?php }         
        } else {
            ?>
                <p>No s'han trobat elements de la categoria</p>
            <?php
        }
        // Restore original Post Data.
        wp_reset_postdata();

    }

    My customized template to display Custom Posts starting from Twenty Sixteen’s archive.php template Types published by WP Download Manager plugin.

    <div id="primary" class="content-area">
        <main id="main" class="site-main">
    
        <?php if ( have_posts() ) : ?>
    
            <header class="page-header">
                <?php
                    the_archive_title( '<h1 class="page-title">', '</h1>' );
                    the_archive_description( '<div class="taxonomy-description">', '</div>' );
                ?>
            </header><!-- .page-header -->
    
            <?php
            // Start the loop.
            while ( have_posts() ) :
                the_post();
    
                /*
                 * Include the Post-Format-specific template for the content.
                 * If you want to override this in a child theme, then include a file
                 * called content-___.php (where ___ is the Post Format name) and that
                 * will be used instead.
                 */
                get_template_part( 'template-parts/content', get_post_format() );
    
                // End the loop.
            endwhile;
    
            // Previous/next page navigation.
            the_posts_pagination(
                array(
                    'prev_text'          => __( 'Previous page', 'twentysixteen' ),
                    'next_text'          => __( 'Next page', 'twentysixteen' ),
                    /* translators: Hidden accessibility text. */
                    'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
                )
            );
    
            // If no content, include the "No posts found" template.
        else :
            get_template_part( 'template-parts/content', 'none' );
    
        endif;
        ?>
    
        </main><!-- .site-main -->
    </div><!-- .content-area -->

    An a screenshot where the pagination nav var is not shown

    Moderator jordesign

    (@jordesign)

    Hey @albertgap – I just wanted to acknowledge your question here. As this is to do with extending the theme – and specifically with the Download Manager plugin – it may be a little out of the scope of this forum.

    I’d recommend reaching out to WP Download’s support if it is related to their CPT – or you could try one of the general forums – which will have more people looking at them (and able to help out).

    https://www.ads-software.com/support/forums/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customized template don’t show page navigation’ is closed to new replies.