How do I run a PHP script on my WordPress website?

by maxdosh 5 replies
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
#programming #php #run #script #website #wordpress
Avatar of Unregistered
  • Profile picture of the author Michael Martin
    PHP is not a plugin it is a language and looks like this. sololearn are good to start
    {{ DiscussionBoard.errors[11081965].message }}
    • Profile picture of the author Michael Martin

      $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
      {{ DiscussionBoard.errors[11081966].message }}
  • Profile picture of the author sunoy14
    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

    "wordpress plugins" & "blogging tutorials"
    Free guitar lessons

    {{ DiscussionBoard.errors[11082017].message }}
  • Profile picture of the author divyakochar
    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
    {{ DiscussionBoard.errors[11094122].message }}
  • Profile picture of the author PhilHardaker
    Simplest solution:
    Install plugin "insert php" by Will Bontrager software.
    {{ DiscussionBoard.errors[11111856].message }}
Avatar of Unregistered

Trending Topics

  • 9 {{ upvoteCount | shortNum }}

    Is It Too Early For Amazon Affiliates To Plan For Christmas?

    Ged3 in Internet Marketing

    Hi All , Christmas is less than four months away and we know how popular Amazon is at that time of year. My question is are Amazon affiliates planning their ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    R. I. P Colin Meads

    hardraysnight in Off Topic

    Colin Meads - All Black, farmer, sportsman, gentleman, most importantly, good Kiwi bloke, R I P

  • 3 {{ upvoteCount | shortNum }}

    How to accept credit card payments with paypal on shopify?

    Dragonknigh in Off Topic

    Anyway to accept credit cards with paypal on shopify for non usa merchants? Or any other simple way of accepting credit cards with shopify? I cant use shopify payments...

  • 8 {{ upvoteCount | shortNum }}

    30k + visitors p/m, email conversion is 0%, any advise please?!

    Hello Warriors, I try to get subscribers to my weekly newsletter but it's not working however I did, only 20 subscribers in the last 6 months, with 1k to 1.7k ... [read more]

  • 148 {{ upvoteCount | shortNum }}

    Tons of Bad Advice In This Thread

    Most people that come to the forum are looking for advice on how to build their business or to otherwise make more money. Thanks to all those willing to help ... [read more]