Forum Replies Created
-
AuthorPosts
-
hatchmediaParticipant
Excellent! That will do the trick! Thanks very much for your help Andrii!
hatchmediaParticipantThanks Andrii,
Not to worry. I wont need the CSS file, just wanted to make you aware.
Cheers though!
Damien
hatchmediaParticipantHi Andrew!
Yes, thats got it, thank you!
What was happening was that my new class name, post-size-long, was being added to the class when called, but post-size-large was being ignored, meaning any of the Large sizes where just appearing as the Normal size.
Merging the two functions into one has worked though, both classes are now being recognised.
You can see the new size on the development site here.
Thanks again for your help with this
Damien
- This reply was modified 10 years, 11 months ago by hatchmedia.
hatchmediaParticipantActually Andrew, I have found where my issue is and wondering if you could help with this. This is from my functions.php:
`// Add custom post class for box size
function size_class($classes) {
global $post;
$postclass = ”;
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Large’ ) {
$postclass .= ‘post-size-large’;
}
$classes[0] = $postclass;
return $classes;
}
add_filter(‘post_class’, ‘size_class’);// Add custom post class for box size
function size_class_long($classes) {
global $post;
$postclass1 = ”;
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Long’ ) {
$postclass1 .= ‘post-size-long’;
}
$classes[0] = $postclass1;
return $classes;
}
add_filter(‘post_class’, ‘size_class_long’);`When this is in, my new Long size works, however, the Large size stops working. What have I done wrong :)
Cheers
Damien
hatchmediaParticipantHi Andrew,
I hope you could help with this. I have added my new size to the files you mentioned above to the OP, however, I am unable to add this new size to the required class. When I test it in Firebug, it seems to work.
Would you be able to tell me where to add my new size so that it adds to the class on the portfolio page?
Cheers
Damien
-
AuthorPosts