Support » Fixing WordPress » Default archives query to shortcode

  • pinokio


    What’s query / default query for WordPress archives that I can put in functions and call it by shortcode:

    <?php do_shortcode('[archives]'); ?>

    inside archive.php

    Found get_queried_object();, I don’t know is it right function.

    Instead of

    <?php while ( have_posts() ) : the_post(); ?>
    <h1 class="entry-title"><?php the_title(); ?></h1>
    <div class="entry-content">
    <?php the_content(); ?>
    /* Custom Archives Functions Go Below this line */
    /* Custom Archives Functions Go Above this line */
    </div><!-- .entry-content -->
    <?php endwhile; // end of the loop. ?>

    I want to call it by

    <?php do_shortcode('[archives]'); ?>

  • The topic ‘Default archives query to shortcode’ is closed to new replies.