keenanwl
Member
Posted 1 year ago #
I would like to build a few .php pages in order to process a form and then present API errors and thank-yous. Is that possible on the WP CMS? What would I need to do in order to make that happen?
As an alternative solution, I would like to process a form wholly within a WordPress page. Is it possible to have wordpress php functions and other php notation on the same page? For example, may I start a session before the header is called?
keenanwl
Member
Posted 1 year ago #
I just wanted to note the error that I got:
Fatal error: Call to undefined function get_header() in /home/afalik/globalcitizenyear.org/wp-content/themes/deMar/DoDirectPaymentReceipt.php on line 83
The get_header() function is the first problem but I can't think why that would be undefined?
It seems that you are calling the .php page directly. To use WordPress functions you have to include "wp_load.php" file exists in the WordPress root directory.
The better option is use custom page template (http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates)
Thanks!
jgomezgarcia
Member
Posted 1 year ago #
Hi there, every one.
I use a plug-in called PHP Exec.
In every page I want to include php code, I write this:
<phpcode>
<?php
(...)
?>
</phpcode>
And it works... ;)
Best regards.
jgomezgarcia
Member
Posted 1 year ago #
Ooops...
Sorry about that.
The link to the plugin's web:
http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/
Best regads.
xxbossmanxx
Member
Posted 1 year ago #
php exec can lead to security issues tho.
Hi keenanwl,
The best way to do this is to create page templates based on your wordpress theme. Customize the page template however you want with your custom PHP code.
Now create a page in wordpress using that page template. That should do the trick.
If you need more info, do ask.
Here are a few links:
>> http://www.davidrisley.com/how-to-custom-page-template-wordpress/
>> http://codex.wordpress.org/Pages#Page_Templates
Regards,
Sterex
Luke America
Member
Posted 1 year ago #
Page templates is the way to go ... and very easy to implement ... plus they're re-usable. I agree completely with sterex.
agedcareaid
Member
Posted 1 year ago #
Hi Guys,
My youtube video link is not shwing up on my Home page.
Pls Pls help me.
I dont know what I am doing wrong.
Pls log in to : http://www.agedcareaid.com.au can u will see " page cannot be displayed" error - some issues with how i hv pasted the code.
Can someone pls put me in the rite direction?
Thanks an Thanks tons
Phyllys
Luke America
Member
Posted 1 year ago #
agedcareaid
Member
Posted 1 year ago #
Thank you Luke
It's still not working :(
i dont knw where I am going wrong....
Thanks tons
Phyllys
Luke America
Member
Posted 1 year ago #
Try using this for the link beneath the video:
http://www.youtube.com/watch?v=Nvb4fxRzQw4
And, use this code for the iframe (paste it as HTML):
<iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/Nvb4fxRzQw4" frameborder="0" allowfullscreen></iframe>
You currently have extraneous data in your URLs.
As other said, page templates is the way to go
agokeren
Member
Posted 10 months ago #
You can use this....
<?php
define(‘WP_USE_THEMES’, false);
require(‘./wp-blog-header.php’);
?>
for header
<?php include (TEMPLATEPATH . ‘/header.php’); ?>
for sidebar
<?php include (TEMPLATEPATH . ‘/sidebar.php’); ?>
for footer
<?php include (TEMPLATEPATH . ‘/footer.php’); ?>
askwhyweb
Member
Posted 9 months ago #
Hi there all,
i am looking for some function using which the default user registeration pattern can be changed, i.e. when new user try to create a user by default wordpress ask a username and email. and sends the password to the user given email.
i need to have function to enter their password manually rather then randomly generated password
My question how to sort this out? Does WordPress have any quick edit for this rather than changing wp-login.php to get this functionality.
Shall be very thankful.
I had posted this question in "How to and troubleshoot" but no buddy answered it.
Regards,
Farhan Islam
wp-fresher
Member
Posted 9 months ago #
Guys i am fresher for WordPress
i am trying to redirect page to otherpage
but in i am not getting any page name in URL only some codes
i checked this
http://pllcsrv/pllctest/wp-admin/options-permalink.php
Permalink Settings here also they gave some codes only.
how to get page name to use in "a herf " tag
or any other option to redirect.
plz help me guys.
illuminatus7
Member
Posted 9 months ago #
@wp-fresher, you can use get_permalink() function to get the URL of the page that you want by the following manner: -
1) First get the page id from its title/ slug
2) Store the page id in a variable.
3) Pass this variable as an argument into the get_permalink() function.
You can check out the code here http://pastebin.com/MPjaZpSK
Nyl Stanton
Member
Posted 6 months ago #
Can sombody please help...
I accidently deleted my entire .htaccess file after editing a 301 redirect. I clicked the wrong button. now i have a new .htaccess file and I dont know how to edit it, I dont know exactly what should be there or how to format it. I dont anything about it. Meanwhile my website is now just a white page. Im using the twenty eleven theme if that helps at all. Please Help...
th77409
Member
Posted 6 months ago #
Is there any way to pass variables from the post into the template? I'm using the PHP Exec plugin, and I'd like to use the post field to pass a bunch of variables into my content-single.php until I get my SQL database running. Any clues?
Kulkarni
Member
Posted 6 months ago #
Use the wordpress extension. Save it through wordperss php extension it will work.
Passagens Aereas
Member
Posted 5 months ago #
Im looking for the same solution... same problem in http://depoimentosdeamor.org but it is working now... In my new blog http://passagensaereaspara.com.br i think my theme is broken...
j.calosor
Member
Posted 5 months ago #
seems like i need to post replies on posts before i can post my own topic?