PHP Dynamic inserts in Wordpress .... ?

by chassm
4 replies
Hey All,
I'm designing a couple of landing pages in wordpress with this really cool theme called WPremix and so far so good, but since I want to test these two landing pages which are "pages" not "posts" I would like to optimize for the right keywords for the purposes of Adwords Traffic.

I know that in a static page you can have php inserts in the landing page code to dynamically insert keywords, which helps relevancy of the page. Does anyone know how to do this in wordpress? Or is there a plugin that helps with this?

The php code I typically use on static pages looks like something like this:

<?php echo ucwords(str_replace("-"," ",$_GET["seed"])); ?>

where seed is the keyword that's going to be in the url.

Thanks for any help you guys can give me.
#dynamic #inserts #php #wordpress
  • Profile picture of the author mywebwork
    There is the Exec-PHP plugin that lets you insert raw PHP into your pages - would that help?

    WordPress › Exec-PHP WordPress Plugins

    Bill
    {{ DiscussionBoard.errors[1717129].message }}
  • Profile picture of the author chassm
    Oh I know which one you mean, this is a plugin to display php code without running the code though. What I need is something that will read the URL of my landing page and take notice of the 'seed' variable and then insert that variable in the places where I'm calling for it. It's called lading page dynamic keyword insertion. It's different.

    Thanks anyway.
    {{ DiscussionBoard.errors[1717141].message }}
    • Profile picture of the author JoeMarketer
      Exec-php does run the php code you include, so it should do what you need. I have used it for inserting the keyword from adwords into a subid which I track in Tracking202

      EDIT
      Actually just-re-read your post..
      Are you automatically building landing pages on the fly based on the seed variable?

      If so, you can create a custom page template which is just for landing pages.
      Then you can just include the code you showed.
      {{ DiscussionBoard.errors[1717259].message }}
  • Profile picture of the author chassm
    Yeah I guess I could create a new header.php file and add he necessary php code there and probably in the body of content like the h1 tags and so on... I guess I was hoping to find a plugin or an easier way. This could take some work since I'm going to build quite few landing pages. Just being lazy I guess I was actually pretty surprised there was not already a plugin for this.
    {{ DiscussionBoard.errors[1717322].message }}

Trending Topics