Get to the RSS cast fields created by acf - wordpress
18 USDThe picture
The text
The field is repeated, that is.In the post you can add several fields with a picture and a few with text.To extract the image and text in the RSS, if these fields are filled, in the same order as in the post.This is partially implemented, the function is written, but it doesn’t work completely, the cracks and some fields are not removed.The function looks like this:
functions fields_in_feed($content) {
if(is_feed( ) {
$post_id = get_the_ID(
$valuesfield = array();
$output =”
$valueads = get_field ('steps', $post_id);
print_R(get_sub_field('step_images', $post_id));
Foreach ($valueads as $val) {
$output .= ''.$val['step_description']“;The
$content = $content.$output
The
Return to $content
The
add_filter ('the_content', 'fields_in_feed');
add_filter('wp_feed_cache_transient_lifetime',
create_function ('$fixrss', 'return 10;'));
You need to copy or rewrite the function so that it works completely.
Часть контента поста (пост тоже кастомный, т.е. custom post type) выводится с помощью кастомных полей, созданных с помощью ACF. Необходимо добавить функцию, чтобы в rss выводился не только контент поста по умолчанию, но и контент из кастомных полей.
Цель - выводить полную rss ленту для turbo и дзен (ленты для turbo и дзен генерируются соответствующими плагинами).
Кастомные поля выводят:
- картинку
- текст
Поля повторяются, т.е. в посте можно добавить несколько полей с картинкой и несколько с текстом.
Выводить в rss нужно и картинку и текст, если эти поля заполнены, в том же порядке что и в посте.
Частично это реализовано, написана функция, но она работает не полностью, не выводятся какртинки и некоторые поля.
Функция выглядит так:
function fields_in_feed($content) {
if(is_feed()) {
$post_id = get_the_ID();
$valuesfield=array();
$output='';
$valueads = get_field('steps', $post_id);
print_R(get_sub_field('step_images', $post_id));
foreach ($valueads as $val) {
$output .= ''.$val['step_description'].'';
}
$content = $content.$output;
}
return $content;
}
add_filter('the_content','fields_in_feed');
add_filter('wp_feed_cache_transient_lifetime',
create_function('$fixrss', 'return 10;'));
Нужно дописать или переписать функцию, чтобы она работала полностью.
Client's feedback on cooperation with freelancer
Get to the RSS cast fields created by acf - wordpressGreat work. Dmitry did everything right.
Profile deleted | Safe
Freelancer's feedback on cooperation with client
Get to the RSS cast fields created by acf - wordpressОтличный заказчик. Коммуникация, ТЗ, проверка, оплата, все отлично. Рекомендую!
Profile banned | Safe
-
549 18 0 Experienced wordpress developer with many years of experience.
Ready to perform the task in a very short time.
thank you
опытный wordpress разработчик с многолетним опытом.
готов выполнить задачу очень короткие сроки
спасибо
-
1591 67 2 3 Hello to you!
Ready to take your order. Web development experience of over 8 years!
I work with all kinds of CMS, with many framevork's and so on Self-Writing sites.
PHP includes 7*, jQuery, jQuery Mobile, CSS3, JavaScript, HTML 5
I begin my work immediately. I am responsible for all orders!
Здравствуйте!
Готов взяться за Ваш заказ. Опыт вэб-разработки более 8-ми лет!
Работаю со всеми видами CMS, со многими framevork'ами а так-же Самописными сайтами.
PHP включая 7*, jQuery, jQuery Mobile, CSS3, JavaScript, HTML 5
К работе приступаю незамедлительно. Ко всем заказам отношусь ответственно!
-
1668 37 4 1 Hello to you. Work experience - 5 years, there is technical experience in the main work. He worked with three dozen complex (and not very) online stores and a large number of ordinary websites. Experience of integration with various CRM systems (Bitrix24, retailCRM, AmoCRM, AlphaCRM), experience of integration with marketplaces - Yandex.Market, Rosetta, Prom, experience of connection of the cash.
Tagged: horbyshyn
Здравствуйте. Опыт работы - 5 лет, есть опыт техлидства по основной работе. Работал с тремя десятками сложных (и не очень) интернет-магазинов и еще большим количеством обычных сайтов. Опыт интеграции с различными CRM - системами (Битрикс24, retailCRM, AmoCRM, АльфаCRM), опыт интеграции с маркетплейсами - Яндекс.Маркет, Розетка, Пром, опыт подключения касс.
тг - horbyshyn
Current freelance projects in the category PHP
Telegram auto-redirect SMS
315 USD
Messages from one bot need to be redirected or duplicated to another bot or to a web resource. If possible, of course. PHP ∙ 3 proposals |
Gmail get message php
315 USD
You need to retrieve emails from the [email protected] mailbox via the Gmail API on the website (PHP). The task is only to receive new emails, I will handle the processing myself. PHP ∙ 2 proposals |
Admin panel for an article websiteGood day. It is necessary to write an admin panel for a gaming article website (this website - https://themeforest.net/item/goodgames-portal-store-html-gaming-template/17704593) The admin panel should include: 1. **User Management:** - Creating new users. - Editing… HTML and CSS, PHP ∙ 7 proposals |
Laravel + VueJS + InertiaJSGood day, the project is written, it is working and ready to launch. Except for one nuance. SSR(Server Side Rendering) works very slowly, when launching a bot to check the load - the site crashes after 3-4 minutes. If you restart SSR during the check, it works but very slowly.… JavaScript, PHP ∙ 2 proposals |
Change the logic of the promotion 1+1=3Video about what needs to be done https://www.loom.com/share/e73bc4b1b04c49f7b78acf95e9ce7d15?sid=73b5c8ee-c7c5-4518-86ef-acfc7ffda194 In short, the logic of the promotion 1+1=3 needs to be changed. Currently, when adding 2 pizzas of 40cm, a modal pops up where the user can… PHP ∙ 1 proposal |