Код шорткода для вордпресса с произвольными полями
4 USDНужно через functions.php создать шорткод такого типа:
// Добавляем шорткод [адреса_офисов]
function custom_shortcode() {
return''.get_field('название_компании').'';
}
add_shortcode( 'адреса_офисов', 'custom_shortcode' );
Внутри этого шорткода нужно что бы выполнялся этот код:
(Это что бы выводился список компаний на страницах главных, но не выводился на дочерних)
<?php if($stati_children->have_posts()) :
while($stati_children->have_posts()): $stati_children->the_post();
echo 'код штмл';
echo ''.the_field('название_компании').'';
echo 'код штмл';
echo ''.the_field('время_работы').'';
echo 'код штмл';
echo ''.the_field('адрес_офиса_компании').'';
echo 'код штмл';
endwhile;
endif; wp_reset_query();?>
Нужно сделать вывод таблицу: Название компании - цена услуг.
Главная страница = город всех компаний
Дочерняя страница = компании города (главной стр)
Выводить нужно шорткод на главной странице (у которой есть дочерние страницы), а информацию брать со всех дочерних страниц - их произвольных полей.
Что бы я кодом мог прописать внутри шорткода вывод произвольных полей и штмл
типа такого массива echo 'код штмл';
echo ''.the_field('название_компании').'';
echo 'код штмл';
echo ''.the_field('время_работы').'';
echo 'код штмл';
Ну по сути внутри шорткода произвольные поля и прописать что бы выводилось только на главной странице (у которой есть дочерние страницы).
При выводе шорткода нужно проверить получается = если страница главная и у нее нет родительской страницы - выводи шорткод (внутри которого нужно выводить штмл+произвольные поля дочерных страниц).
Произвольные поля плагина Advanced Custom Fields
-
1 day4 USD
351 1 day4 USDДобрый день. Готов выполнить Ваш заказ. Есть опыт. Сделаю быстро.
Current freelance projects in the category PHP
Fix CLSIt is necessary to fix the Cumulative Layout Shift through code PageSpeed does not see this problem, but through Google Chrome, it is visible that there is a layout shift for the desktop version of the page According to Google Search, there is an error regarding the speed of… PHP, Web Programming ∙ 2 days 8 hours back ∙ 28 proposals |
Transfer the fully ready adaptive HTML5 structure to WordPress.
267 USD
I am looking for an experienced WordPress developer who can convert our meticulously prepared static HTML5/CSS3 code into a high-performance custom WordPress theme. The frontend is almost ready (about 99%): semantic markup, metadata, and multilingual structure (hreflang) are… Content Management Systems, PHP ∙ 2 days 11 hours back ∙ 63 proposals |
GoPos IntegrationHello, has anyone done an integration of GoPos with a custom website for a restaurant in Poland? I need help, their documentation is very sparse, there is only swagger and it lacks descriptions. https://app.gopos.io/doc/swagger-ui/index.html The essence is this: we used their… PHP, Web Programming ∙ 3 days 3 hours back ∙ 25 proposals |
Write meta data for ALT using AIA website on Laravel, the site has many images for which it is necessary to automatically generate correct semantic and relevant ALT descriptions for the images, with the possibility of verification. AI & Machine Learning, PHP ∙ 4 days back ∙ 35 proposals |
A developer is needed to complete and integrate a project for automatic data collection and processing.
16 USD
The main part of the parser has already been implemented. The parser works in a Windows environment through Microsoft Edge: the site has anti-bot protection, so data collection is performed not through direct HTTP requests, but through a live browser session. The scripts control… PHP, Web Programming ∙ 4 days 6 hours back ∙ 26 proposals |