Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 30th Mar 2013, 02:45 PM   #1
Active Warrior
 
Join Date: 2010
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
Default
Question about wordpress
Share on: 
fb share twitter share gplus share more share

Ok earlier I had to set up a variable to call the url into a optin form for affiliates. I was wondering if there is a way when i go to my site without calling any variables if it will show my info for my optin instead of it being blank?



jdem02 is offline  
Unread 30th Mar 2013, 02:55 PM   #2
Web Developer
War Room Member
 
Andrew H's Avatar
 
Join Date: 2012
Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
Default
Re: Question about wordpress
Share on: 
fb share twitter share gplus share more share

You are using a PHP 'if' statement to check if the variable 'isset' before you assign it. So if it isn't set we can use the php 'else' statement. ie: if this is set do this, if not do this. So add a extra couple lines to each of your variable requests.

if (isset($wp_query->query_vars['fid'])) {
//set the fidto a variable for easier use later
$fid= $wp_query->query_vars['fid'];
} else {
//the get variable isn't set so we set it manually
$fid = 'yourinfohere';
}

Do that for each of your variables and replace 'yourinfohere' with what you need.

"You shouldn't come here and set yourself up as the resident wizard of oz."
Andrew H is offline  
Unread 30th Mar 2013, 06:17 PM   #3
Active Warrior
 
Join Date: 2010
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: Question about wordpress
Share on: 
fb share twitter share gplus share more share

Ok I get ya. So if i just type www.blahblahblah.com it will show my variables and if they use their referral then it will show their variables



jdem02 is offline  
Unread 30th Mar 2013, 06:24 PM   #4
Web Developer
War Room Member
 
Andrew H's Avatar
 
Join Date: 2012
Location: Vancouver, BC
Posts: 593
Thanks: 149
Thanked 162 Times in 133 Posts
Default
Re: Question about wordpress
Share on: 
fb share twitter share gplus share more share

Change <input type="hidden"... to <input type="text"... and you can see what is happening.

"You shouldn't come here and set yourself up as the resident wizard of oz."
Andrew H is offline  
Unread 30th Mar 2013, 06:27 PM   #5
Active Warrior
 
Join Date: 2010
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: Question about wordpress
Share on: 
fb share twitter share gplus share more share

works perfect man.. Thanks again!



jdem02 is offline  
Unread 30th Mar 2013, 06:44 PM   #6
Active Warrior
 
Join Date: 2010
Posts: 81
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: Question about wordpress
Share on: 
fb share twitter share gplus share more share

One more question.. You may not know this but it works fine when i go to my site with no ref just regular website but then when i go to put a ref in it brings me to a pretty much non existing page. It only works but a subfolder. so i have to go http://www.mywebsite.com/ref/ then it brings up my regular site and when i ad the variables it works too. Just dont work on the main domain



jdem02 is offline  
Closed Thread


Bookmarks

Tags
question, 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 06:27 PM.