shenandoahliterary / Shenandoah

Project management for development and production of Shenandoah literary magazine
1 stars 0 forks source link

header.php: set volume number, issue number, pub date in WP #125

Open jeffreybarry opened 2 years ago

jeffreybarry commented 2 years ago

Note for milestone ShenAleph 2.1.

Currently, the volume number, issue number, and publication date are hard coded into the theme for each issue in the header.php file.

                <div class="volumeIssueBanner">
                <span class="">Volume 71, Number 1 &middot; Fall 2021</span>
                </div>

To do:

Code a function within the WP Dashboard that enables a non-programmer to set these variables directly.

jeffreybarry commented 1 year ago

Use WP ACF plugin to set this data. First, try out on the landing page theme to set volume, issue number, date as it appears on the landing page. Currently, this data is pulled from a page titled "landing page" with page ID of 7084 into the landing page theme. 

Current code from https://github.com/shenandoahliterary/ShenAleph-landing-page/blob/master/template-parts/content-landing-page.php 

<?php
        remove_all_filters('posts_orderby');
        $landingpage_args = array(
            'page_id' => '7084'
        );
        $landingpage_loop = new WP_Query($landingpage_args);
                while ($landingpage_loop->have_posts()) : $landingpage_loop->the_post();
                 ?>
                <div class="issue-entry-box">
                    <?php the_content();  ?>
            </div>
        <?php endwhile;
        wp_reset_postdata();
        ?>

Steps for implementation