Anyone? I just want to be able to pull articles from other blogs and link directly to them. I’ve thought about using FeedWordpress and setting the links to go to the original website but I do not want a flow of posts when I want to be able to pick and choose from time to time, and from a variety of websites.
Here is what I have setup for my headline right now, it pulls posts from a category. I want to be able to publish a post, but link the title of the post to a different site.
<?php
$featuredPosts = new WP_Query();
$featuredPosts->query('showposts=12&cat=7');
while ($featuredPosts->have_posts()) : $featuredPosts->the_post(); ?>
<div class="headlines"><a href="<?php the_permalink() ?>"><?php if (strlen($post->post_title) > 50) {
echo substr(the_title($before = '', $after = '', FALSE), 0, 50) . '...'; } else {
the_title();
} ?></a>
<?php endwhile; ?>
You might try using Magic Fields.
http://magicfields.org/getting-started/
That should make it a LOT easier for you.
OK, I gave it some thought. You can accomplish this without all the overhead of an extra plug-in like Magic Fields.
Find in your template (/wp-content/themes/index.php) the place where the Permalink is being called: href="<?php the_permalink() ?>"
Keep the href=""
and replace the <?php the_permalink() ?>
with
<?php $Link = get_post_meta($post->ID, externalLink, true); if (!empty($Link)) { echo $Link; } else { echo get_permalink($post->ID); } ?>
Then in your individual posts, add a custom field with the name externalLink
and for the value of that externalLink, add your external URL.
Let me know if that works for you.