Tagged: x
-
AuthorPosts
-
December 30, 2016 at 9:50 am #1309948
Hello!
So, I have succesfully changed the text that appears on hover on the ethos carousel to the custom fields I created. Now I want to change the default font size of the hover texts, since what I want to put in them does not work. I found code on how to do that, but since I have custom text, the code needs adaptation and I have no idea how to achieve.
This is the line in my functions.php that defines the fields being used to appear on hover in the carousel:
<span class="entry-cover-meta"><?php echo get_post_meta( get_the_ID(), '1', true ); ?></span> <span class="entry-cover-meta"><?php echo get_post_meta( get_the_ID(), '2', true ); ?></span> <span class="entry-cover-meta"><?php echo get_post_meta( get_the_ID(), '3', true ); ?></span>
This is the code that I inserted into my style.css to change the font size:
.x-post-carousel-meta>span.entry-cover-author {
font-size: 20px; /*Change this to your preferred font size for the author*/
}
.x-post-carousel-meta>span.entry-cover-date {
font-size: 20px; /*Change this to your preferred font size for the date*/
}
.x-post-carousel-meta>span.entry-cover-categories {
font-size: 20px; /*Change this to your preferred font size for the categories*/Now since I no longer use entry-cover-author, span.entry-cover-date or entry-cover-categories for the text on hover, this second code is not working and needs to be adapted and pointing to the custom fields I created instead.
Please please help me out with this, you guys rock!
url:homodelectus.com
December 30, 2016 at 4:23 pm #1310344Hi there,
Thanks for posting in.
You mean, change the font size at once? Because since the code uses all the same entry-cover-meta then what you need is this
.x-post-carousel-meta>.entry-cover-meta { font-size: 20px; /*Change this to your preferred font size for the date*/ }
Now, if you wish to change font size of each meta, then you’ll change your code to something like this
<span class="entry-cover-meta-1"><?php echo get_post_meta( get_the_ID(), '1', true ); ?></span> <span class="entry-cover-meta-2"><?php echo get_post_meta( get_the_ID(), '2', true ); ?></span> <span class="entry-cover-meta-3"><?php echo get_post_meta( get_the_ID(), '3', true ); ?></span>
And CSS to this
.x-post-carousel-meta>.entry-cover-meta-1 { font-size: 20px; /*Change this to your preferred font size for the date*/ } .x-post-carousel-meta>.entry-cover-meta-2 { font-size: 15px; /*Change this to your preferred font size for the date*/ } .x-post-carousel-meta>.entry-cover-meta-3 { font-size: 10px; /*Change this to your preferred font size for the date*/ }
Hope this helps.
January 6, 2017 at 12:17 pm #1319129Hello Rad! That helps truckloads. Thank you!
January 6, 2017 at 3:54 pm #1319357You’re more than welcome, glad we could help.
Cheers!
-
AuthorPosts