Egor Shvetsov
Forum Replies Created
Viewing 6 posts - 16 through 21 (of 21 total)
Viewing 6 posts - 16 through 21 (of 21 total)
That’s what you have written here )))
https://wpgeodirectory.com/add-custom-body-classes-to-wordpress/
Here is the translation in Russian including my small contribution, and I will probably do more as I am working and customising a website.
https://www.dropbox.com/s/56qx7ykkvod37wi/geodirectory-ru.po?dl=0
Egor.
Here is the translation in Russian including my small contribution, and I will probably do more as I am working and customising a website.
Egor.
Hi Paolo, thank you for your attention.
The problem:
My theme (Hueman) uses three columns layout for single posts, with about 280 px sidebars on both sides.
Listing details post was inherited this style and it occurred that listing details were squeezed in between, into a column in the middle, wich is about 600 px or less. It didn’t look pretty.
In addition, sidebars were not shown on the listing details post.
I found the solution for it. If you allow I post it here, perhaps it will help someone.
The code below allows choosing a body class for posts with a specific slug. Body classes should exist in the theme or can be added into custom CSS. In my case, my theme had the class I needed.
In this code all posts with the slug ‘places’ will have body class=”page-template-default”. Only these two parameters should be changed.
The code should be added to function.php.
add_filter(‘body_class’,’wpsites_specific_page_body_class’);
function wpsites_specific_page_body_class($classes) {
if ( is_category( ‘places’ ) )
{
$classes[] = ‘page-template-default’;
return $classes;
}
}
Thank you.
Hi Kor Chung, thank you for your reply!
I tried to look into listing-detail.php. However, I still can’t figure it out. I suppose there is some conflict between my theme and the plugin, I am using Hueman theme which supports custom layouts for different pages, the problem might be in it.
Thank You,
Egor.
Hi, do you still need help with Russian?
Get the latest news, tips, and exclusive content directly in your inbox.
Confirm your email address, and instantly receive the discount code :)