Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

What is the best way to adjust content.php "col-md-x" values

Home / Forums / Virtue Theme / What is the best way to adjust content.php "col-md-x" values

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
November 20, 2016 at 4:11 am

Hi there,

I am trying to adjust the image size in the excerpts of my blog. I found a way to adjust the image size by using a child theme and overwriting “kt_post_excerpt_image_width_portrait” and “kt_post_excerpt_image_height_portrait”. This kinda works but the image is centered in the “col-md-4”. This results in unneeded space left and right of the image.

The ideal solution would be to change the “col-md-4” to “col-md-3” for the image and increase the “col-md-8” to “col-md-9” for the text.

I looked into the content.php and found the line of code to adjust these values.

$kt_feat_width = apply_filters('kt_blog_image_width', 1140);
$kt_portraittext = 'col-md-8';
$kt_portraitimg_size = 'col-md-4';

To change the values I could overwrite the complete content.php. Which is rather radical.
I would like to just add following function to my function.php (so I can get easily theme updates without manually tweaking your theme files):

function kt_custom_blog_column_layout() {
add_filter('kt_blog_column_portrait_text', 'kt_blog_custom_column_portrait_text');
function kt_blog_custom_column_portrait_text() {
return 'col-md-9';
}
add_filter('kt_post_excerpt_image_height_portrait', 'kt_blog_custom_column_portrait_image');
function kt_blog_custom_column_portrait_image() {
return 'col-md-3';
}
}
add_action('init', 'kt_custom_blog_column_layout');

So that this can work you would need to update your content.php line 15 and 16.

I am open for other suggestions.

  • The forum ‘Virtue Theme’ is closed to new topics and replies.