- This topic has 2 replies, 2 voices, and was last updated 9 years, 4 months ago by
Puro Support.
Tagged: Child Theme entry meta ultra
- AuthorPosts
- December 29, 2015 at 2:31 am #2877
Puro SupportKeymasterHi jfisherfbm
It’s great to hear from you. We can probably just do this from a child theme functions.php file. What is the ID of the category you don’t want entry meta to appear on?
December 29, 2015 at 3:01 am #2878
Puro SupportKeymasterThere are many ways this can be done. Here is a quick one. Copy single.php to your child theme. Change the .entry-header div as follows:
<header class="entry-header <?php if ( in_category( '7' ) ) { echo "custom-cat"; } ?>"> <div class="container"> <h1 class="entry-title"><?php echo get_the_title(); ?></h1><?php ultra_breadcrumb(); ?> </div><!-- .container --> </header><!-- .entry-header -->
We’ve added:
<?php if ( in_category( '7' ) ) { echo "custom-cat"; } ?>
Next, wrap the entry-meta div in a conditional:
<?php if ( ! in_category( '7' ) ) : ?> <div class="entry-meta"> <div class="container"> <div> <?php ultra_posted_on(); ?> </div> </div><!-- .container --> </div><!-- .entry-meta --> <?php endif; ?>
In both cases, replace the category ID 7 with yours.
Finally, in the style.css file of your child theme or in a Custom CSS plugin, insert:
.single .entry-header.custom-cat { margin-bottom: 2.67857em; }
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.