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 8122019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:41:52+00:00 2026-06-06T05:41:52+00:00

I am having a content sharing site where i share themes and gadgets for

  • 0

I am having a content sharing site where i share themes and gadgets for windows 7.

I am uploading the file using a custom field and storing its value in a custom field named durl.

Now I want to create a separate page called “Download” and when a user visits the posts page and when he clicks the download button, he must be forwarded to a new page where the download must start.

The new page “Download” must get the custom field value “$durl” from the post.

Is it possible? I have done it in codeigniter but no idea how to achieve this using wordpress.

Please guide me on that.

regards,
Rias

  • 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-06T05:41:53+00:00Added an answer on June 6, 2026 at 5:41 am

    Here is another way you can do it.

    Create a Downloads template by copying page.php and have this in your new template:

    <?php
    /*
    Template Name: Downloads
    */
    ?>
    

    Fill the template with header, footer, etc like page.php. Create a new page in WordPress and assign the template “Downloads” to it.

    In your original post (single.php) for example, create the download link dynamically like this:

    <a href="/download/?fileID=<?php echo $post->ID; ?>">Download File</a>
    

    The user will be redirected to Downloads page which you just created. You need to put this code in your downloads template / page:

    <?php
    
    if (isset($_GET['fileID']) && is_numeric($_GET['fileID'])) { // to verify that fileID is passed
          // we now have the post ID in downloads page and can create download link
          $file = get_post_meta($_GET['fileID'], 'durl', true);
    }
    ?>
    
    <a href="<?php echo $file; ?>">Download now</a>
    

    And it should print the custom field value in downloads page (which is the download link related to your post)

    The idea of this code is to pass the post ID in $_GET and use the post ID to get the download link via its custom field.

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

Sidebar

Related Questions

I'm having fun with a change to a content type field (from a node
My Old site is developed in Drupal which is having a Content Type to
In my app i have a UIWebView having a content from file (HTML) im
Possible Duplicate: Regex for matching javadoc fragments I have files having content like /**
I having issue that content assistant / intellisense is working in methods such as
In VS 2008, I have an ASP.NET content page having one master page. I
I am new to jquery mobile, and am having problems getting content I have
im having problems on how to save the content of an array in an
I'm having an error message when inserting content which contains quotes into my db.
I am having a issue in a Content Slider that when I scroll (by

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.