Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 30th Apr 2017, 03:57 PM   #1
Internet Marketer
 
maxdosh's Avatar
 
Join Date: 2015
Location: Wakanda
Posts: 202
Thanks: 49
Thanked 26 Times in 13 Posts
Default
How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

I was looking for a plugin but then figured a php script on codecanyon can do what i want on my WordPress website but then i don't know a thing about php script and how to make it work on my WordPress website. Do i install it or something to have it function like wen i install a plugin in WordPress. Need help thanks

maxdosh is offline  
Unread 1st May 2017, 05:22 PM   #2
Warrior Member
 
Join Date: 2017
Location: Manchester UK
Posts: 18
Thanks: 0
Thanked 13 Times in 10 Posts
Default
RE: How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

PHP is not a plugin it is a language and looks like this. sololearn are good to start
Michael Martin is offline  
Unread 1st May 2017, 05:23 PM   #3
Warrior Member
 
Join Date: 2017
Location: Manchester UK
Posts: 18
Thanks: 0
Thanked 13 Times in 10 Posts
Default
RE: How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

<?php

$keyword_one = $result['keyword_one'];
$keyword_two = $result['keyword_two'];
$keyword_three = $result['keyword_three'];
$keyword_four = $result['keyword_four'];
$keyword_five = $result['keyword_five'];
$keyword_multi = $result['keyword_multi'];



$input = array($keyword_multi);
$keyword = array_rand($input);

// echo $input[$keyword]; $keyword_one, $keyword_two, $keyword_three, $keyword_four, $keyword_five
?>
Michael Martin is offline  
Unread 1st May 2017, 06:53 PM   #4
Web developer at rom-link
 
Join Date: 2014
Location: India
Posts: 162
Thanks: 70
Thanked 15 Times in 15 Posts
Default
Re: How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

If you havent worked with programming language like php or havent coded in wordpress, you should probably just get a plugin.

Otherwise you can add the php script with add_action hooks or add_shortcode inside functions.php. Or you may want to put the code inside a theme template file

Web developer at www.rom-link.com. Web design, themes and plugins.
Free guitar lessons www.mamamusicians.com
sunoy14 is offline  
Unread 16th May 2017, 03:40 AM   #5
Active Warrior
 
Join Date: 2016
Location: 913, Pearls Omaxe Tower-2, Netaji Subhash place, New Delhi
Posts: 67
Thanks: 6
Thanked 26 Times in 21 Posts
Default
RE: How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

The php script needs to be executed on the wordpress to work. So either you can add the script to the page where you need it to work but adding any code which you don't have idea about can be harmful. So, you better take a hard look on that code and if that isn't malicious then you can add it to the page where it needs to be executed

divyakochar is offline  
Unread 6th Jun 2017, 02:34 AM   #6
PHP Python SQL Saas Dev
 
PhilHardaker's Avatar
 
Join Date: 2014
Location: San Francisco Bay Area
Posts: 41
Thanks: 0
Thanked 13 Times in 12 Posts
Default
RE: How do I run a PHP script on my WordPress website?
Share on: 
fb share twitter share gplus share more share

Simplest solution:
Install plugin "insert php" by Will Bontrager software.
https://wordpress.org/plugins/insert-php/
PhilHardaker is offline  
Closed Thread


Bookmarks

Tags
php, run, script, website, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:33 AM.