Whakaritea To Whangai WordPress Ma te Whakaahua Whakaatu me te Tauākī Manatārua (Ihirangi o mua me te Whakamutunga)
Tetahi mea whakamere WordPress ko te whakapakoko whakaatu kaore ano kia whakauruhia ki roto i te RSS whāngai. He ahua pouri tenei, na te mea ko te kowhiri, ko te hoahoa ranei i te ahua e whakaatuhia ana ka aro nui ki tetahi tuhinga.
Whakaritea Ihirangi Ki Nga Panui I To Whangai RSS
Ko te whakarite i te atahanga kua whakaatuhia ki to ihirangi ehara i te mea uaua. Anei te waehere i tapiritia e ahau ki taku WordPress functions.php
i roto i toku Kaupapa Tamaiti kōnae:
function prerssfeedcontent($content) {
global $post;
$current_year = date('Y');
$post_title = get_the_title( $post->ID );
$post_link = get_permalink( $post->ID );
$post_image = get_the_post_thumbnail( $post->ID, 'medium' );
// Add the featured image
if ( has_post_thumbnail( $post->ID ) ) {
$precontent = '<p class="thumb">';
$precontent .= '<a href="' .$post_link. '" title="' .$post_title. '">';
$precontent .= $post_image;
$precontent .= '</a></p>';
}
$content = $precontent . $content;
return $content;
}
add_filter('the_excerpt_rss', 'prerssfeedcontent');
add_filter('the_content_feed', 'prerssfeedcontent');
Hei taapiri, kei te pirangi ano ahau ki te taapiri i nga ihirangi kei te mutunga o aku pou whangai.
Whakapirihia te Ihirangi Ki Nga Panui I To Whangai RSS
I ahau e arotake ana i nga backlinks ki Martech Zone, He maha nga wa ka kitea e au he waahi kei te tahae i aku ihirangi me te whakaputa i a raatau i runga i to raatau pae. He whai mutunga kore, he whakararu. He maha nga wa ka taea e au te whai i a raatau; i etahi wa, ka taea e au te ripoata ki o raatau whatunga panui me nga kaiwhakarato manaaki. Engari i te nuinga o te wa, ko te nuinga he ingoamuna, he uaua ki te whai… mena.
Ko te mutunga, ko taku mea anake ko te whakarite i taku whangai me te whakauru i tetahi tauākī manatārua kia kite ai nga manuhiri o te pae kore mana i te puna. Ki te mahi i tenei, i whakahoutia e ahau te mahi i runga ake nei hei taapiri me te taapiri i nga korero e hiahia ana ahau.
function prepostrssfeedcontent($content) {
global $post;
$current_year = date('Y');
$post_title = get_the_title( $post->ID );
$post_link = get_permalink( $post->ID );
$post_image = get_the_post_thumbnail( $post->ID, 'medium' );
$company_title = "DK New Media, LLC";
$company_link = "https://martech.zone/partner/dknewmedia/";
// Add the featured image
if ( has_post_thumbnail( $post->ID ) ) {
$precontent = '<p class="thumb">';
$precontent .= '<a href="' .$post_link. '" title="' .$post_title. '">';
$precontent .= $post_image;
$precontent .= '</a></p>';
}
// Add the copyright
$postcontent = '<p>©';
$postcontent .= $current_year;
$postcontent .= ' <a href="'.$company_link.'">'.$company_title.'</a>, All rights reserved.</p>';
$postcontent .= '<p>Originally Published on Martech Zone: <a href="'.$post_link.'">'.$post_title.'</a></p>';
$content = $precontent . $content . $postcontent;
return $content;
}
add_filter('the_excerpt_rss', 'prepostrssfeedcontent');
add_filter('the_content_feed', 'prepostrssfeedcontent');
Ka taea e koe te tiro i te hua i runga i taku whangai… ka whakaatuhia te ahua kua whakaatuhia me te mana pupuri me nga hononga puna taketake i te mutunga o ia panui.