|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
2009-04-03, 03:38 PM | #1 |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
How to carry a query string in wordpress post.
Im trying to figure out how to carry an affiliate id in posts through an rss feed in wordpress. Is there a string of code i can add on to my links in my post? Or is there a plugin that can manage this?
__________________
Sig Goes Here! |
2009-04-03, 05:49 PM | #2 |
Porn Blog Addict
|
I use runPHP
http://www.nosq.com/blog/2006/01/run...for-wordpress/ allows you to use PHP in your posts. There might be a better way, but this works for me. |
2009-04-04, 01:38 AM | #3 | |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
Quote:
Thank You
__________________
Sig Goes Here! |
|
2009-04-06, 04:57 PM | #4 |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
Anyone know how to carry a query string in the post titles or a way to include it in the permalinks? Im thinking maybe htaccess?
__________________
Sig Goes Here! |
2009-04-07, 06:57 PM | #5 |
Porn Blog Addict
|
You will most likely need to modify your theme.
Using the default kubrick theme, here is how I put the query string in the post title.. this is in the main index template, can you see where I made the modification? Code:
<h2><a href="<?php the_permalink() ?><?php echo (isset($_GET['ref'])) ? '?ref='.$_GET['ref'] : ''; ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> |
2009-04-08, 04:15 PM | #6 |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
That was perfect Beaver Bob. How do you do the rss feeds? Ive searched through all the files trying to find a href spot for my query string. Is this done a different way?
__________________
Sig Goes Here! |
2009-04-08, 06:13 PM | #7 |
Porn Blog Addict
|
you have to modify the feed-rss file in the wp-includes directory. Don't look for href but look for everywhere that displays a link.
|
2009-04-09, 02:09 PM | #8 |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
Beaver Bob Thanks for your help so far. Im still having problems. In my feeds-rss file I found the two bits of code
Code:
<link><?php the_permalink_rss() ?></link> Code:
<link><?php bloginfo_rss('url') . ?></link> Code:
<link><?php the_permalink_rss() . $_GET ['aff_link_id']; ?></link> Code:
<link><?php bloginfo_rss('url') . $_GET ['aff_link_id']; ?></link> So I thought i would go to feed.php and add my string to the the_permalink_rss function. This worked half ass, it will display my aff_link_id= but it will not display the actual affiliate number. I was going to try and use session variables to carry the affiliate number, but i cant seem to get it to work. Any suggestions?
__________________
Sig Goes Here! |
2009-04-09, 02:17 PM | #9 |
Porn Blog Addict
|
try this:
Code:
<link><?php bloginfo_rss('url') ?><?php echo (isset($_GET['aff_link_id'])) ? '/?aff_link_id='.$_GET['aff_link_id'] : ''; ?> ?></link> |
2009-04-09, 02:46 PM | #10 |
My name is hashbury not assburry
Join Date: Oct 2007
Location: Tampa
Posts: 1,125
|
I had to add it to the function
Code:
function the_permalink_rss() { echo apply_filters('the_permalink_rss', get_permalink()). '?aff_link_id=' .$_GET['aff_link_id'];
__________________
Sig Goes Here! |
2009-04-10, 11:51 AM | #11 |
Porn Blog Addict
|
hope it works out for you!
|
|
|