Hello!
The class is not added in any way, I have already raised everything, and I have already got from the route to the container, I just can’t understand why the changes are not processed. If I changed something in the plugin and tried hooks, nothing happens.
Example:
add_filter('hivepress/v1/templates/listings_view_page', function ($template){
return hivepress()->helper->merge_trees($template,[
'blocks' => [
'page_container' => [
'blocks' => [
'page_columns' => [
'blocks' => [
'page_content' =>[
'blocks' =>[
'listings_container'=>[
'attributes' => [
'class' => 'facetwp-template',
],
]
]
]
]
]
]
],
]
]);
});
If anything, I’m trying to wrap posts and pagination in one container (although they are already in one in the array) and add a class to it.
To be honest, integrating a custom filter with a plugin is very difficult.
If interested, I can throw off a couple of logical fixes, in the case of facetwp integration.
Привет!
Никак не добавляется класс, я уже все поднял, уже от роута до контейнера добрался, никак не могу понять почему изменения не отрабатывают. Если что я менял и в плагине и хуками пробовал, ничего не получается.
Пример:
add_filter('hivepress/v1/templates/listings_view_page', function ($template){
return hivepress()->helper->merge_trees($template,[
'blocks' => [
'page_container' => [
'blocks' => [
'page_columns' => [
'blocks' => [
'page_content' =>[
'blocks' =>[
'listings_container'=>[
'attributes' => [
'class' => 'facetwp-template',
],
]
]
]
]
]
]
],
]
]);
});
Если что я пытаюсь обернуть посты и пагинацию в один контейнер(хотя по массиву они и так в одном) и добавить ему класс.
Честно говоря интегрировать кастомный фильтр с плагином очень тяжко.
Если интересно, то могу скинуть пару логических исправлений, в случае интеграции facetwp.