Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:22:36+00:00 2026-06-14T20:22:36+00:00

I am currently trying to make a e-zine using wordpress, and have most of

  • 0

I am currently trying to make a e-zine using wordpress, and have most of it done. The homepage displays a list of the “pieces” which are included in that edition of the e-zine. I would like to make it so that, when an edition expires (currently using Post Expirator plugin), a new page is created automatically resembling the front page in showing the index of that particular (now expired) edition.

I’m not very experienced using PHP, and still a newbie at wordpress. How could I accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:22:37+00:00Added an answer on June 14, 2026 at 8:22 pm

    Here is what I ended up doing, using the suggestions of Felipe as a starting point. There might be a less convulted way of doing this, but, as I said, I’m just a beginner, so this is what I came up with:

    First, I created a volnum variable, which keeps track of the current volume number. Then, I cache the front page so that later I can save it as an independent html document:
    This is at the beginning of the index.php, before the get_header().

    <?php $volnum; ?>
    <?php ob_start(); ?>
    

    In the front page, I have an editorial and, next to it, I have the content index. I am saving the editorial tag’s (which is always “voln” where ‘n’ is the volume number) volume number (maybe the foreach is not necessary since the editorial only has one tag) :

    <?php $tags = get_the_tags();
          foreach ($tags as $tag){
            $volnum = $tag->name;
          }
    ?>
    

    Finally, at the end of the document, after the last html, I have added the following code:

    <?php
        $handle = opendir("past_vol/");
        $numOfFiles = count($handle);
        $volExists = false;
        for($i=0;$i<=$numOfFiles;$i++){
            $name = readdir($handle);
            if($volnum.".html" == ($name)){
                $volExists = true;
                continue; 
            }
        }
        if($volExists == false){
            $cachefile = "past_vol/".$volnum.".html";
            $fp = fopen($cachefile, 'w'); 
            fwrite($fp, ob_get_contents());
            fclose($fp);
        }
        closedir($handle);
        ob_end_flush(); 
    ?>
    

    “past_vol” is the directory where I am saving the past volume html files. So the directory is opened, the amount of files is counted, and a loop that goes through each file’s name is started. If a file with the same name as $volnum, then $volExists is true. If at the end of the loop $volExists is false, then it saves the cached page.

    Again, it could probably be optimized a whole lot, but for now this works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to make a set of conversion functions which, through one call,
i'm currently trying to make a asp.net mvc3 app. in the sample application which
I am currently trying to make a broadcast receiver which will invoke after android
I am currently trying to make a game in Android. I have this piece
so I'm currently trying to make an OpenID provider. I've tried using two Java
I'm currently trying to make a page via php which allows the user to
im currently trying to make a simple IRC Gui Client. Im using the SmartIrc4net
I'm currently trying to make an application which could digitally sign any kind of
I'm currently trying to make a register form using mongoDB and nodeJS - I've
I'm currently trying to make a button which will take the user back to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.