رفتن به مطلب

سوال در مورد فراخوانی زمینه در rss


پست های پیشنهاد شده

سلام دوستان من زیاد برنامه نویسی بلد نیستم می خوام یک سری از زمینه های دلخواه وبسایت رو تویه فید نمایش بدم مثلان می خوام این زمینه رو:

<td class="rightcolumn tour_vert_title">از</td>
                                    <td class="tour_vert_value" align="right"><?php echo get_post_meta(get_the_ID(), 'zttour_source', TRUE); ?><br></td>
                                </tr>
                                <tr>

ازش استفاده کنم و بزار داخل فید سایتم تویه کدهای زیر:

function fields_in_feed($content) {  
    if(is_feed()) {  
        $post_id = get_the_ID();  
        $output = '<div><h3>Find me on</h3>';  
        $output .= '<p><strong>Facebook:</strong> ' . get_post_meta($post_id, "facebook_url", true) . '</p>';  
        $output .= '<p><strong>Google:</strong> ' . get_post_meta($post_id, "google_url", true) . '</p>';  
        $output .= '<p><strong>Twitter:</strong> ' . get_post_meta($post_id, "twitter_url", true) . '</p>';  
        $output .= '</div>';  
        $content = $content.$output;  
    }  
    return $content;  
}  
add_filter('the_content','fields_in_feed');

اما هر جور کدها رو می زارم جواب نمی گیرم یک نمونه که خودم گذاشتم و فراخوانی نشده!

function fields_in_feed($content) {  
    if(is_feed()) {  
        $post_id = get_the_ID();  
        $output = '<div><h3>اطلاعات تور</h3>';  
        $output .= '<p><strong>مقصد از:</strong> ' . get_post_meta(get_the_ID(),'zttour_source',true) . '</p>';
        $output .= '<p><strong>نوع سفر:</strong> ' . get_post_meta($zttour_transport,true) . '</p>';  
        $output .= '<p><strong>قیمت از:</strong> ' . get_post_meta($zttour_price_from,true) . '</p>';
        $output .= '</div>';  
        $content = $content.$output;  
    }  
    return $content;  
}  
add_filter('the_content','fields_in_feed');

چیکار کنم و دقیقا باید چه کدی اینجا قرار بدم تا زمینه دلخواه را فراخوانی کنه.

 

ممنون میشم باتشکر

لینک به ارسال
×
×
  • اضافه کردن...