Featured image on single post wrapped left or right of text

Posted in: Newspaper
Post count: 61

Hello,

How can I have the featured image wrapped left or right of text on single posts

Thank you

Post count: 780

Currently only via custom css. Do you want me to make it for you?

Post count: 61

Hi Radu,

No I don’t need you to do it ;), but my result is not nice.

Can you help improve?

1) re-sized the image in functions.php

//featured image
$td_crop_features_image = td_util::get_customizer_option('crop_features_image');
if ($td_crop_features_image == '') {
 //add_image_size('featured-image', 700, 0, true); 
 add_image_size('featured-image', 320, 0, true);
} else {
 //add_image_size('featured-image', 700, 357, true); 
 add_image_size('featured-image', 320, 180, true);
}

2) added some custom css in wp-admin/themes.php?page=editcss
To make the image float on the right (not a good way does not play nice responsive, please tell me a better way)

.post .thumb-wrap {
	text-align: center;
	margin-bottom: 5px;
	background-color: #f2f2f2;
	float: right;
	margin-left: 10px;
}

Can you help improve, it does not play well on responsive

Thank you

Post count: 780

Do you have a url to this thing? This things are not that simple as you may have thought. That’s why we avoid them so much but we should be able to float left an image correctly.

Radu from tagDiv

Post count: 61
Post count: 780

Hello,

please try to add this code in the child theme:


/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
    .post .entry-thumb {
      width:220px;
    }
}

/* responsive phone */
@media (max-width: 767px) {
    .post .entry-thumb {
      width:120px;
    }
}
Post count: 61

Hi,

Thank you exactly what I was looking for.

Can you give me some more info on this responsive css.

@media (min-width: 768px) and (max-width: 1018px)

Can I change the width value ie 768px? or are these fixed values

are there other things like @media to know about.

I have very little experience with this new kind of css @ thing

Thank you

Post count: 3343

Hello,
Thiss css will be applied only on that resolution from 768px to 1018

/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
    you css here
}

here are all the rules that we use:

/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
    
}

/* responsive monitor */
@media (min-width: 1200px) {
    
}

/* responsive phone */
@media (max-width: 767px) {
    
}
Post count: 61

Hi,

I had given up for a while, now with V3 it looks great, im exited.

What should I do now to get the result we achieved above?

In the functions.php of the theme I found:

<?php

/*  ----------------------------------------------------------------------------

    WordPress booster framework - this is our theme framework - all the content and settings are there

    It is not necessary to include it in the child theme only if you want to use the API

*/

if (!defined('TD_THEME_WP_BOOSTER')) {

	include TEMPLATEPATH . '/includes/td_wordpres_booster.php';

}

I am confused, thank you for your help.

Post count: 854

hi,
the above code includes our WP BOOSTER plugin in the theme.

if you are not a coder my advice is to hire one for this task, it should make things much easier for you.

Thanks for you message.
Radu A.

Post count: 61

My question is, do I make changes in the functions.php in the child theme or in the main theme? when I add

//featured image
$td_crop_features_image = td_util::get_option('tds_' . 'crop_features_image');
if ($td_crop_features_image == '') {
    add_image_size('featured-image', 320, 0, true);
} else {
    add_image_size('featured-image', 320, 180, true);
}

in the child theme nothing happend

Thank you for helping

Post count: 61

Its also not loading the css from the child theme

/*

Theme Name:     Newspaper Child theme

Theme URI: 		http://themeforest.net/user/tagDiv/portfolio

Description:    Child theme made by tagDiv

Author:         tagDiv

Author URI: 	http://themeforest.net/user/tagDiv/portfolio

Template:       Newspaper                             

Version:        1

*/

@import url("../Newspaper/style.css");

/*  ----------------------------------------------------------------------------

    Your custom style.... here :)

*/

.post .thumb-wrap {
	text-align: center;
	margin-bottom: 5px;
	background-color: #f2f2f2;
	float: right;
	margin-left: 10px;
}

/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
    .post .entry-thumb {
      width:220px;
    }
}

/* responsive phone */
@media (max-width: 767px) {
    .post .entry-thumb {
      width:120px;
    }
}
Post count: 61

So basicly its not loading the customizations from the child theme. I have installed and activated the child theme

Post count: 3343

Hi,
Add your custom CSS in Custom CSS section in Theme panel, no matter if you use The Child Theme. On updates you will not loose the CSS.

Thanks!

Viewing 14 posts - 1 through 14 (of 14 total)
The forum ‘Newspaper’ is closed to new topics and replies.