Skip to content

Forum Archive

Can I add a php scr...
 
Notifications
Clear all

Can I add a php script in WordPress

28 Posts
8 Users
0 Likes
761 Views
KoiKiwi
(@koikiwi)
Posts: 137
Entrepreneur Customer
Topic starter
 

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

 
Posted : 18/06/2021 8:31 am
Adilkhan
(@adilkhan)
Posts: 2112
Moderator/Level 8 Member Customer
 

Did ypu mean how to install and add php script to my main website

 
Posted : 19/06/2021 11:53 am
Hassan Raza
(@hassanraza)
Posts: 509
Member Customer
 
Posted by: @koikiwi

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

Yes you can.

Follow these steps.

From your WordPress dashboard, navigate to XYZ PHP Code -> PHPCode Snippets.

In the PHP Code Snippets page, click Add New PHP Code Snippet. Add your desired PHP function and its tracking name to the appointed boxes. In this example, we will add the date() function that returns the local date and time. Then, click Create.

 

This image shows you how to add PHP code to the Insert PHP Code Snippet plugin. This plugin will help you add PHP to WordPress post or page.

If the process is successful, a confirmation message and the new function will appear on the screen. For future use, make sure all the PHP functions you want to use are active by checking the Action section. Active code snippets will show a green pause symbol while inactive ones will have a green checkmark next to them.

 

This image shows you how to tell if the added function is active. To deactivate the function, click on the Pause button in the Action section..

To add a PHP code to a WordPress post or page, paste the snippet shortcode of the function you want to use in the desired location. If you’re using the Gutenberg block editor, use the shortcode or code block to display it.

 
Posted : 19/06/2021 1:10 pm
Ihthisham
(@ihthisham-ahmed)
Posts: 1751
Noble Member
 
Posted by: @koikiwi

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

Hello friend, this might be helpful - https://www.codeclouds.com/blog/how-to-insert-custom-php-to-a-wordpress-post/

 
Posted : 19/06/2021 2:21 pm
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

Wordpress doesn't directly allow it However you can use some plug-in and then insert php in wordpress.

 
Posted : 20/06/2021 1:14 pm
Ihthisham
(@ihthisham-ahmed)
Posts: 1751
Noble Member
 
Posted by: @muhammad-aown

Wordpress doesn't directly allow it However you can use some plug-in and then insert php in wordpress.

Install and activate the Insert PHP Code Snippet plugin

 

 
Posted : 21/06/2021 3:21 am
Ihthisham
(@ihthisham-ahmed)
Posts: 1751
Noble Member
 
Posted by: @koikiwi

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

Install and activate the Insert PHP Code Snippet plugin

 

 
Posted : 22/06/2021 11:00 am
Adilkhan
(@adilkhan)
Posts: 2112
Moderator/Level 8 Member Customer
 

By default, WordPress doesn't allow you to run PHP code in posts or pages. The recommended way to add PHP functions is to modify the child theme or create custom page templates. Despite so, there are occasions where you might want to add specific PHP functions to an individual post or page.

Taken From:Hostinger.com

 
Posted : 24/06/2021 1:06 pm
KoiKiwi
(@koikiwi)
Posts: 137
Entrepreneur Customer
Topic starter
 

@muhammad-aown ok thanks for clarification 

 
Posted : 24/06/2021 3:30 pm
KoiKiwi
(@koikiwi)
Posts: 137
Entrepreneur Customer
Topic starter
 

@ihthisham-ahmed thank you for the advice!

 
Posted : 24/06/2021 3:31 pm
Ihthisham
(@ihthisham-ahmed)
Posts: 1751
Noble Member
 
Posted by: @koikiwi

@ihthisham-ahmed thank you for the advice!

You are welcome, friend.

 
Posted : 26/06/2021 6:52 am
batoolabbas
(@batoolabbas)
Posts: 1693
Member Customer
 
Posted by: @koikiwi

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

WordPress doesn’t allow you to run PHP scripts in pages. The recommended way to add is to modify the child theme or create custom page templates. You have to use plugins for that 

There is a full guide on the Hostinger’s website you can follow

https://www.google.com/amp/s/www.hostinger.com/tutorials/wordpress/how-to-add-php-code-to-wordpress-post-or-page/amp

 

 

 
Posted : 08/07/2021 12:19 am
preetchovatiya
(@preetchovatiya)
Posts: 797
Member Customer
 
Posted by: @koikiwi

Hi everyone just wondering if I can intergrade a PHP script into my WordPress website?

Yes, absolutely. You can add a PHP script inside your WordPress dashboard. You can also do changes in the coding of the theme.

 
Posted : 12/07/2021 3:43 pm
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@adilkhan to his wordpress main blog website.

 
Posted : 15/07/2021 7:42 am
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@preetchovatiya but how? Bro. I want to know about.

 
Posted : 15/07/2021 7:42 am
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@batoolabbas can you mentioned some video about the tutorial?

 
Posted : 15/07/2021 7:43 am
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@hassanraza but this plugin will require all the coding of php but pup script comes in a set of files.

 
Posted : 15/07/2021 7:45 am
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@ihthisham-ahmed but this article is about custom php, i mean it is talking about simple php scripts but what about web applications written in php.

 
Posted : 15/07/2021 7:46 am
Muhammad aown
(@muhammad-aown)
Posts: 6735
Member Customer
 

@koikiwi it just my estimate, its not guaranteed.

 
Posted : 15/07/2021 7:47 am
Adilkhan
(@adilkhan)
Posts: 2112
Moderator/Level 8 Member Customer
 
Posted by: @muhammad-aown

@adilkhan to his wordpress main blog website.

what to his wordpress main blog website

 
Posted : 16/07/2021 6:07 am
Page 1 / 2
Share: