majedali
Member
Posted 2 years ago #
hi all i am using the Widget Logic add on to control the appearance of my widgets in the site
there is some pages without any widgets
and i want if there is no content in the sidebar
i want the post page to use the full page templates
in the pages i can set the fullpage templates
but in the posts i can't
majedali
Member
Posted 2 years ago #
am i clear :)
ok if i have a category and i want just in that category to use the full page template
how can i do it
majedali
Member
Posted 2 years ago #
hi i found this code but still not work if u can help
for archive.php
if (is_category('1')) {
include('full-page.php');
} else {
// the rest of the code
}
or in the single.php
foreach((get_the_category()) as $category) {
if ($category->cat_ID == 1) { $istheone = true; }
}
if ($istheone) {
include('full-page.php');
} else {
// the rest of the code
}