خوبه یه کمک هم نمیکنند دوستان
تا حدودی یافتم باید چیکار کرد
افزونه FeedWordpress Link Soruceرو نصب کردم
حالا میخام لینک title رو همون لینک منبع بزارم کسی میتونه کمک کنه؟
FeedWordpress Link Soruce
<?php
/*
Plugin Name: FeedWordpress Link Soruce
Description: Auto Add FeedWordpress Soruce.
Version: 0.1
Tested up to: Wordpress 3.0 Multisite,buddypress 1.2.5.2
License: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
Author: MzMuttaqin
Author URI: http://masta.rumahterjemah.com/
Plugin URI: http://masta.rumahterjemah.com/
Tags: link, Feed, FeedWordpress
*/
function mzm_FeedWordpress_soruce($content ) {
global $post;
//only in signle page
if( ! is_single())
return;
if (get_post_meta($post->ID, 'syndication_permalink', true)) {
$feedlink = get_post_meta($post->ID, 'syndication_permalink', true);
$sitelink = explode('/', $feedlink, 4);
$sitelink = $sitelink[2];
$feedsource = '<p>[<a href="'.$feedlink.'" target="blank" rel="nofollow">source: '.$feedlink.'</a>]</p>';
$fdcontent = $content . $feedsource ; //or
} else {
$fdcontent = $content;
}
return $fdcontent;
}
add_filter('the_content', 'mzm_FeedWordpress_soruce',99999,1);
?>
index قالب سایتم
<?php /*
Template Name: Index
URI: http://discusstech.org/
Description: Feature-packed theme with a solid design, built-in widgets and a intuitive theme settings interface... Designed by <a href="http://discusstech.org/">DiscussTech.Org</a>.
Version: 1.00
Author: Salsan Jose
Author URI: http://discusstech.org/
roTags: light, white,two-columns, Flexible-width, right-sidebar, left-sidebar, theme-options, threaded-comments, translation-ready, custom-header
http://discusstech.org/
Both the design and code are released under GPL.
http://www.opensource.org/licenses/gpl-license.php
*/?>
<?php get_header(); ?>
<!-- Title -->
<h1>آخرین ارسال ها</h1>
<!-- end Title -->
<!-- Posts starts -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="posts" class="<?php the_ID(); ?> posts">
<!-- Author Avatar -->
<div class="avatar"><a href="<?php echo get_author_posts_url(get_the_author_id());?>" title="<?php the_author();?>" alt="<?php the_author();?>"><?php echo get_avatar( get_the_author_email(), '35' );?></a></div>
<div class="posted">
<div class="author"><!-- Author name --><?php the_author_posts_link(); ?></div>
<div class="date"><!-- Post Date--> <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' پیش'; ?> </div>
<ul>
<?php edit_post_link('ویرایش','<!-- Post Edit--><li class="edit">','</li>'); ?>
<li class="comment"><!-- Post Comments--><?php comments_popup_link('0', '1', '%', ''); ?></li>
</ul>
<div class="clearboth"></div>
<h2><!-- Post Title --><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<!-- Post Data-->
<br><?php the_content_rss('', TRUE, '', 60); ?>
</div>
<div class="clearboth"></div>
</div>
<!-- Posts Ends -->
<?php endwhile; ?>
<?php if(is_paged()):?>
<!-- Navigation starts -->
<div id="navigation">
<?php next_posts_link('<div class="alignleft button">« مطالب قبلی </div>') ?>
<?php previous_posts_link('<div class="alignright button">مطالب جدید »</div>') ?>
<div class="clearboth"></div>
</div>
<!-- Navigation ends -->
<?php endif; ?>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>