Jump to content

Archived

This topic is now archived and is closed to further replies.

stebacon

How to adjust the featured image size for blog posts.

Recommended Posts

stebacon    0
stebacon

Hi folks.

 

I am using Pagelines DMS to build my blog http://foodandfitness.co.uk.

 

The problem i have encountered, and struggled to find answers for in the forums, is how i can change the size of the featured image as it is displayed along with the excerpt in the 'list view'.

 

Currently i have my blog roll settings as 'list view' with the image 'left justified' at 150px by 150px.

 

I would like to be able to use the settings as 'list view' with image 'on top' - however when i use these settings the featured image is cropped and large portions of my image are no longer visible.

 

I would like my images to be displayed as 600px by 600px (un-cropped) with the title, meta and excerpt underneath.

 

It's important for me that my blog uses large images rather than the small ones i currently have to use, but i can't seem to figure this problem out! 

 

If anyone has a solution or advice i would be very grateful. 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

Add the following to your child themes functions.php file:

 

add_action('after_setup_theme', 'thumbs_dms', 11);
  function thumbs_dms(){
    add_image_size( 'basic-thumb', 600, 600, false );
    add_image_size( 'landscape-thumb', 600, 600, false );
}
 
Then install the Regenerate Thumbnails plugin from the Wordpress plugin repo, regen your thumbs and then refresh your site, your image should now be full size and not cropped.
 
  • Like 2

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
stebacon    0
stebacon

Hi Danny.

 

Thank you very much for this information, i now understand what i need to do.

 

One more question before i implement this, and it's something i've been meaning to address for a while now.  

 

Since the change over to DMS i haven't got around to figuring out how the child theme works.  

 

With the previous drag and drop version of Pagelines it was quite straightforward to just install the baseline theme that was provided.  

 

To install a child theme with DMS, is it as simple as just choosing the ones available from the store, either paid or free, and just activating it?  Will it be recognised as a child theme and be protected from updates?

 

Thanks for you time mate.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

You can install one of those from the store or create your own.

 

To create your own, simply upload a folder naming it whatever you like and then in that folder add a style.css file. The contents of the style.css file must contain the following:

 

/*
Theme Name:     My child themes name
Description:    ...
Author:         Your name
Author URI:     http://my-website.com
Template:       dms
Version:        1.0.0 (change the value to whatever you like)
*/
 
The most important part of the all those tags is the Template: dms this basically tells Wordpress that this theme is a child of DMS. You can then do as Nick has done with his bas theme and add the following:
 
functions.php - To add actions hooks and filter hooks, plus other functions.
A sections folder - In case you want to override the core sections or create your own.
A LESS folder - In case you want to override the default LESS CSS.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
stebacon    0
stebacon

That's great Danny, thanks for taking the time to help me out - very much appreciated.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem, especially as you're a fellow Mancunian 

  • Like 2

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
stebacon    0
stebacon

Well observed!  That automatically makes you my favourite member of staff and go to guy  :D

 

Thanks again! 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

:D


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
stebac+    3
stebac

Hi Danny

 

Hope you're doing well mate? DMS 2 looks awesome, i'm just about to make the change over and have a play around.

 

Just a quick question with regards to the previous help you gave me in this thread about child themes.

 

Now that DMS 2 is here, do i need to do anything differently when setting up the style.css file?

 

I had a look but couldn't see anywhere that told me if the template name had changed?

 

Is it still 'template: DMS' or would that have changed to something like 'template: DMS2'?

 

Any advice would be appreciated.

 

Thanks mate.

Share this post


Link to post
Share on other sites
batman    389
batman

Hi stebac

You don't need any change.

You can use the same Child Theme.

 

There are a very good Danny´s Child Theme in this

https://github.com/Dannyholt/Skeleton

This works fine to me !

;)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
stebac+    3
stebac

Hi batman.

 

Thank you very much for clarifying and providing a link.

 

Really useful and appreciated.

 

:D  

  • Like 1

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

thanks batman


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
joyjet    0
joyjet

Hi Danny, thanks for this great post. just wanted to know where i upload the danny skeleton on the database?

thanks

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

Hello @joyjet 

 

Please create you own topic 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites

  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      Is it possible, and if so, how, to change the layout of the archive pages? For example, I would like to use a smaller and more compact image size for featured images and shorten the amount of text that's displayed for each post without also changing how featured images are displayed on single post pages.
      I am talking about https://michaelkummer.com/apple/ vs How to extend the storage of your iPhone or iPad.
      Thanks
      Michael
       
    • Audun MB
      By Audun MB+
      The media selector for sections uses full size images, you can't choose to use smaller file sizes. That means that sections are huge in file size. So for a box image in Boxes which will never be wider than 500 px, Pagelines choose full image size, even if it is a 2 mb photo. 
      Adding alt and title text to the images would also be good.
      I'd prefer to use the default setup by WP, which has all the options we need.
      For now I have to use this plugin as a workaround, by selecting the best size and add it in the url field.
    • jeomiland
      By jeomiland+
      Hi guys
      I saw discussion back in 2013 about ibox/icon/image size. Here's another question.
      Have a client who wishes to have iboxs displaying several product categories in a shopping store, then under that, a couple more boxes - with clickable images - with DIFFERENT ASPECT RATIOS!!! from the iboxes used above.
      see  http://ecoluxhomeproducts.com/storedev/dev/ (site under development so may look different when you visit)
      So is iBox the only section that has clickable images AND some sort of text describing the action you wish to take? And how control aspect ratio of the media display box? Client want's the 2 down below (Designer Collections and Blog) to be longer, landscape.  I know I can code it up in HTML or PHP, but the idea is to make it simple for client to change the images AND the text AND the url the link goes to.
      So any ideas what's the best section to accomplish this? And how control aspect ratio (those 2 images are actually landscape dimensions.)
      Thanks
      JE
    • kwp4petar
      By kwp4petar
      I have been trying so many different options on the forums and nothing's working for me.  On one site (most recent one i'm working on), I can change the size of the navigation bar at the top with no problem at all.  However, when I try using Simple Navi (Full Width) on another site, nothing works.  All I want is the logo to be larger (be it by changing the size of the container or the image div itself). I think my biggest issue is not knowing exactly what I need to direct my css changes to.  I am also trying to change the background of the bar.  I don't want any background. 100% transparent background.  I've tried using 'background-color: transparent;' but that hasn't had any effect so far.  I also tried using a 1% (as well as a 50%) transparent solid color image from photoshop to set it as the background, but that didn't work either.
       
      So here's the long story short of what I want:
       
      1. What's the easiest way to find the exact name of the object(would 'div' be a more correct term?) I am making changes to in css? (i've tried using Chrome's 'Inspect Element' but that doesn't always work)
         
          ex: How do people know to do '.section-navi img { .... }'
       
      2. How do I change the size of the logo being used in Simple Navi (full-width)?
       
      3. How can I make the navbar have either slightly transparent solid colored background, or no background at all (100% transparent).
    • espitia
      By espitia
      Hello, I'm trying to have the images (featured images) from the Flipper be thumbnail. I set that as the option but still shows large images. You can check out the site at http://casamotif.com. It is under the big splash image on the home page.
       
      Thanks in advance.
×