Posted in: Newspaper
Feb 1, 2014 at 7:56 am
I noticed that the date box that is overlaid on the 2 column slider appears to be a pixel lower than the category box that it is right next to. This only happens to me on a Retina Macbook Pro.
I fixed the problem by editing the line-height attribute of CSS in media=”all” .iosSlider .slide-meta-author. I changed it from 28px to 29 px. I haven’t been able to confirm if this makes it too high on a standard display.
Also, does anyone know if it would be fairly simple to add the category and the date to the large image on the “Big Slide”?
Thanks!
Feb 3, 2014 at 10:03 am
Hello,
Copy this codes like here: http://screencast.com/t/cTs3q7q0g
$buffy .= '<div class="slide-meta">';
$buffy .= '<span class="slide-meta-cat">';
$buffy .= $this->get_category();
$buffy .= '</span>';
$buffy .= '<span class="slide-meta-author">';
//$buffy .= $this->get_author();
$buffy .= $this->get_date();
$buffy .= '</span>';
$buffy .= '</div>';
and this
function get_category() {
$buffy = '';
//read the post meta to get the custom primary category
$td_post_theme_settings = get_post_meta($this->post->ID, 'td_post_theme_settings', true);
if (!empty($td_post_theme_settings['td_primary_cat'])) {
//we have a custom category selected
$selected_category_obj = get_category($td_post_theme_settings['td_primary_cat']);
} else {
//get one auto
$categories = get_the_category($this->post->ID);
if (!empty($categories[0])) {
if ($categories[0]->name === TD_FEATURED_CAT and !empty($categories[1])) {
$selected_category_obj = $categories[1];
} else {
$selected_category_obj = $categories[0];
}
}
}
if (!empty($selected_category_obj)) { //@todo catch error here
$buffy .= '<a href="' . get_category_link($selected_category_obj->cat_ID) . '">' . $selected_category_obj->name . '</a>' ;
}
//return print_r($post, true);
return $buffy;
}
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.