How to get custom post data into a downloadable excelsheet file


I am little stuck in one situation, actually i am creating a custom WordPress theme and what i want is that. On my home-page i put a download link (i.e when clicked by the user all the posts of category resume will be downloaded in the form of Microsoft excelsheet). But i am unable to find any relevant solution on google and also i have no idea how to do.

    // the query
    $the_query = new WP_Query(array(
        'post_type' => 'resume',
        'post_status' => 'publish',
        'posts_per_page' => 500,
    <?php if ($the_query->have_posts()) : ?>
       <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>

            <div class="col-md-3 col-sm-6 col-xs-12">
                <div class="full services_blog">
                    <?php the_post_thumbnail(); ?>
                    <h4><?php the_title(); ?></h4>
                   <?php the_excerpt('more text'); ?>
                  <?php  $release_title = get_post_meta( get_the_ID(), '_candidate_email', true );
                        echo $release_title;
            <?php endwhile; ?>
              <?php wp_reset_postdata(); ?>

              <?php else : ?>
                <p><?php __('No Services'); ?></p>
    <?php endif; ?>

this above code only display posts on frontend from resume post category.

, , , , Almight Hacker 3 years 2020-08-27T08:10:46-05:00 0 Answers 38 views 0

Leave an answer