Topic: how to insert php code to pages

i want to edit my 404 template

i got this code inside the page

404 Page Not Found

We're sorry but the page you are looking for doesn't appear to exist!

Please go back in your browser, or click the link to return to website.

website.com

but doesn't work here


regards bernte

Re: how to insert php code to pages

you can edit it in "pages -> edit 404 pages"

but remember, you have to make a "error.template.php" or "404.template.php" first. and then you select "settings", and change your template.

I'm not like them but I can pretend.

3 (edited by bernte 2013-11-17 14:57:56)

Re: how to insert php code to pages

Hi Aryandhani...

thats all i have done before... i think you have missunderstood my question.

i try to explain again!

i click on Pages -> Edit 404 Page

there i insert

404 Page Not Found

We're sorry but the page you are looking for doesn't appear to exist! Please go back in your browser, or click the link to return to website. website.com

then i go to frontend and call a link which doesn't exist!
the 404 template works but not the php-part of

my sourcecode from the frontend looks like this

404 Page Not Found

We're sorry but the page you are looking for doesn't appear to exist! Please go back in your browser, or click the link to return to website. website.com

all i want to know how to echo the site-url inside Pages (without typing manually)

Re: how to insert php code to pages

ahh.. yes. sorry, I apparently misunderstood big_smile

if that's the problem. I still do not understand hehe

I'm not like them but I can pretend.

Re: how to insert php code to pages

Why don't you just write this native PHP code?

XSS Testing

tovic's Website

6 2013-12-06 12:02:49

Re: how to insert php code to pages

have you tried your code?

i also tried it on normal pages! (START PAGE)
seems that i can't run php from here?

your code:

gives me on frontend:

http://website.com/monstra/

php doesn't parse here!

7 2013-12-06 12:13:50

Re: how to insert php code to pages

got it.. this works

404 Page Not Found

We're sorry but the page you are looking for doesn't appear to exist! Please go back in your browser, or click the link to return to website. {siteurl}

Re: how to insert php code to pages

How? Are you trying to write PHP code inside the post composer form? If so, then now I understand your problem from the start.

XSS Testing

tovic's Website