It’s my personal preference not to touch the database unless completely necessary, and I feel it isn’t necessary in this case.
It is possible to do what you want by creating a new custom field for the URL of the product you want to link to, and then, replacing your normal headline with the value of that custom field in your theme’s templates.
See the Codex’s documentation on using custom fields for details on pulling the value of your custom field.
For RSS feed modification, you might want to look at your RSS template files, e.g. wp-rss2.php, and do the same thing.
OK this is where I stand ATM.
ID, ‘link’, $single=true) ?>”>Product Link
I’ve placed this in the Loop but it isn’t aligned where I would like. I think this might be a CSS problem/solution.
http://www.ooee.biz/?p=11
RSS still havent got a clue, I get errors when replacing:
this:
<link><?php permalink_single_rss() ?></link>
with:
<link><?php get_post_meta($post->ID, ‘link’, $single=true)?></link>
Need help.
Ash
For your RSS2 template, try this to pull the value of your custom field into a variable named $avariablename:
<?php list ($avariablename) = get_post_custom_values('link'); ?>
Then, put $avariablename between the link tags, i.e.
<link>$avariablename</link>
If that still doesn’t work, although it should, you could always use the following plugin, which lets you call custom fields using a simple template tag:
http://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/
Might be overboard, though, if you’re using only one custom field.
ZMAng genius my friend it worked with a little modification.
I added
<?php list ($avariablename) = get_post_custom_values(‘link’); ?>
Under:
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<link><?php print $avariablename ?></link>
Just need to mod the CSS so that the Product link appears underneath the posts and above the comments and I’m done.
Ash