0

I need to create php file like download.php.

In this file download links for movie or program,

when users click on download button, this file download.php load in fancybox and display download links.

http://sitename/template_path/download.php?post_id=post_id

2
  • Whats the question? You have simply made a statement that you want to create this type of page.. confused> Sorry, just re-read your TITLE, How to!>> good starting point here. wpbeginner.com/wp-themes/… – Malisa Sep 15 '16 at 16:53
  • You did not understand my question & my english is not good. – capkronos00 Sep 15 '16 at 17:06
0

It is not normal practice in WP development to include executable PHP in content.

Most typically this would be implemented with a shortcode which provides safe element to put into content, which renders a more complicated output required.

Not sure about download.php part, I would guess that might be better off incorporated into WP runtime as well, but depends on what exactly it does and how.

0

This post same my id Looking for a better way to handle an ajax script that pulls in post data on click

but i need to load current post metabox data in custom php file.

0

Executing the PHP file in the templates is not recommended, following are the suggestions:

  • Make a shortcode for the PHP file to execute in functions.php and then use the shortcode in content editor.
  • Use the Bootstrap Modal which is a pure html code which you can code it in the content editor directly. example: Bootstrap Modal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.