![]() | | ||||||||
| | #1 |
| Warrior Member War Room Member Join Date: Feb 2009
Posts: 25
Thanks: 2
Thanked 0 Times in 0 Posts
|
Hey Folks, I had a quick question that I'm hoping someone here can help me out with... I got the following php code to put on my landing pages: <?php if ($_GET['page'] != "") {$keyword=ucwords(str_replace("-"," ",$_GET['page'])); } else { $keyword="Your Primary Keyword"; } ?> and then just put <?php echo $keyword;?> wherever I want the keyword to show up on the page. But I have a couple of things that I would ideally like to have happen and this whole PHP thing is completely foreign to me... Ideally, I would like the keywords to be placed in the headline of my page and do 2 things: 1) have each first letter of the keyword capitalized 2) If the keyword itself has the word "free" in it, I would like that either to not show up or to have free in my headline taken out... For Example: I want a headline that reads "FREE (Whatever Keyword)!" where "FREE" is what I already have written in the headline so I don't want it to look like "FREE (Free Keyword)!". Does that make sense? If anyone has any clue on how to do that I would greatly appreciate it :-). Cheers |
| | |
| | #2 |
| Advanced Warrior War Room Member Join Date: Jun 2009 Location: Chesterton, IN
Posts: 923
Thanks: 129
Thanked 193 Times in 153 Posts
|
By looking for the $_GET[] variable that means your urls will look like: yoursite.com/index.php?page=my-keywords-here which fills the keyword variable with "My Keywords Here" The ucwords() capitalizes the first letter of each word. You can pattern match to remove the word free in the string. Str_replace - String Replace - Replace PHP About $50 to write the script for you if interested. |
| Webmaster Services List Your Wealth Building Systems and Services for Free Insanity is doing the same thing over and over and expecting a different result ~ Einstein Insanity is doing the same thing over and over and never getting the same results ~ Ken | |
| | |
![]() |
|
| Tags |
| adding, dynamic keyword, headline, keywords, landing, page, search |
| Thread Tools | |
| |
![]() |