Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I just recently completed this task.
There is hardly a ready-made solution, because everyone has their own data structure for export. I did it myself.
In functions.php add write:
// Yandex.Realty RSS
add_action('init', 'AddYandexRSS');
function AddYandexRSS(){
add_feed('yandex-realty', 'ProceedYandexRealtyRSS');
}
function ProceedYandexRealtyRSS() {
get_template_part('rss-realty');
}
header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?>';
?>
<realty-feed xmlns="http://webmaster.yandex.ru/schemas/feed/realty/2010-06">
<generation-date><?= date('c'); ?></generation-date>
<!-- здесь проходим циклом по списку своих объектов недвижимости, оборачивая их в тег <offer internal-id="<? the_ID(); ?>"></offer> -->
</realty-feed>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question