Ideal featured image size in ClassicPress theme

Hi,

I (still) don’t have a Github account, that’s why I post here…

In the post/page editor I read this advice in the featured image box:
Ideal size is 800 x 471 pixels.

Why this ideal/recommended size?
Re the width: it will scale to max 100% of the available space (= 791px).
Re the height: depends, is personal.

And this size (especially the width) does not always apply, for example the product image of Classic Commerce.

Guido

every theme has their own feature image settings (that they can set in the add_aupport() function.

That theme probably can use the feature image as Title Background for the page or post… That is why they suggest a wide and tall one.

Hi @ElisabettaCarrara

That theme

I’m talking about the default ClassicPress theme and I mean the featured image at the single post page (displayed above the post/page content).

lemme do a check of the code… I will tell you where that is set and probably also the rationale for it…

/**
 * Modify Featured Image Text
 */
function filter_featured_image_admin_text( $content, $post_id, $thumbnail_id ) {
	$help_text = '<p><i>' . __( 'Ideal size is 800 x 471 pixels.', 'the-classicpress-theme' ) . '</i></p>';
	return $help_text . $content;
}
add_filter( 'admin_post_thumbnail_html', 'filter_featured_image_admin_text', 10, 3 );

first we have this in function.php (it basically means that they replace CP default text to use the theme text that you are asking about).

in single.php, responsible to show the single blog post page we do have this:

<div id="primary">
		<main id="main">

		<?php
		while ( have_posts() ) :
			the_post();

			get_template_part( 'template-parts/content', get_post_type() );

Translated it means that if there are posts they should be shown using the template in the specified directory that is template-parts>content.php

<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package Susty
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( is_singular() ) : ?>
	<header>
		<?php
		the_title(
			'<h1>',
			'</h1>'
		);

		if ( 'post' === get_post_type() ) :
			?>
			<p class="entry-meta">
				<!--span class="author-avatar">
					<?php //echo get_avatar( get_the_author_meta( 'ID' ), '50' ); ?>
				</span-->
				<span class="post-meta">
					<?php susty_wp_posted_on(); ?>
					<?php susty_wp_posted_by(); ?>
					<?php esc_html_e( ' | Category: ', 'the-classicpress-theme' ); ?>
					<?php the_category( ', ' ); ?>
				</span>
			</p><!-- .entry-meta -->
		<?php endif; ?>
	</header>

<?php else : ?>
	<header class="blog">
		<?php
		the_title(
			'<h2><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">',
			'</a></h2>'
		);
		?>
	</header>
<?php endif; ?>
	
	<?php
	if ( is_singular() ) {
		susty_wp_post_thumbnail();
	}
	?>

	<div>

		<?php
		the_content(
			sprintf(
				wp_kses(
				/* translators: %s: Name of current post. Only visible to screen readers */
					__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'the-classicpress-theme' ),
					array(
						'span' => array(
							'class' => array(),
						),
					)
				),
				get_the_title()
			)
		);

		wp_link_pages(
			array(
				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'the-classicpress-theme' ),
				'after'  => '</div>',
			)
		);
		?>
	</div>

	<footer>
	</footer>
</article><!-- #post-<?php the_ID(); ?> -->

This is the code for the template part. it checks if it is a single post, and if yes the feature image is shown like a “cover” as first image under the title and meta (category, author and the like).

That is why it asks for a wide and tall one. it goes in as first image and it serves as a cover.

Hi,

The size doesn’t make sense IMO.
If you want to give advice about an ideal size, why a “not normal” height of 471px?
Because 800x471px is not aspect ratio 16:9 or 4:3.
And, as mentioned before, only add this advice in the post/page editor, not in the editor of custom post types (such as products).

Guido

that was probably made because that theme has a FAQ CPT that needs that feature. And the image sizes for that do make sense…
I am not the developer nor maintainer of it, it is a derivate from SustyWP theme but I have not checked if the latter has same requirements.

I think @timkaye being an expert in SustyWP and having helped with The ClassicPress theme can help.

I only reported what I found. That is that the image is placed as “cover” atop content if it is a single blog post.

1 Like

It’s a fair question. The ClassicPress Theme was taken from what we use on the main CP website. Users kept asking for what we do there, so that’s how it is. I don’t remember looking at the featured image dimensions, so it was probably done a long time ago, and those on the news seems to be using a ratio of 4:3. So this might be worth modifying.

But the theme is very lean, so you can use it as your own base. Feel free to change the dimensions to whatever suit you.

2 Likes

Hi Tim,

As The ClassicPress Theme becomes the default theme, I suggest removing this notice from the featured image box.

Guido

1 Like

It only takes a few minutes to create an account and will save more time than that very quickly by allowing you to submit the changes yourself, verses someone else needing to sort through posts and then create a pull request for you.

You seem to be spending enough time helping out that it would be worth it for everyone.

2 Likes

So, I feel like I should step in here to provide some history and context.

I initially developed the theme used by ClassicPress.net a bit more than 6 years ago, using Susty as a starting place. As implemented for ClassicPress, it was/is a full-site theme, not just a blog theme. It contained lots of styles and template features that were developed specifically to meet the needs of the CP website (many specified by the designer), and may be of little use (or confusing, such as the custom thumbnail instructions meant to serve as a reminder for blog post thumbs) to someone using it to create their own website. After a couple of years, I stepped away from maintaining the CP website and it was taken over by other community members.

A few months ago, I decided to create a web journal, and to use the ClassicPress theme from the directory, thinking it must have been modified to work as a more general theme if it’s in the directory, allowing me to get my journal up quickly with minimum fuss. What I found was that, while there were a lot of modifications to style sheet, files, and templates, there are a lot of things left in place that don’t serve a purpose in a general theme. It took me a couple of days to further modify templates and style sheet to get the simple journal website I was hoping for, modifying or eliminating things that caused problems (but not stripping it to the chassis and rebuilding, as probably should be done).

Bottom line, I would not recommend the ClassicPress Theme be on the directory nor included as the default theme until it’s completely overhauled. Being called the “ClassicPress Theme” implies a quick and easy implementation for a simple blog-type website, and that’s just not the case; unless there has been some work on it since I downloaded it a couple months ago.

4 Likes

@EliteStarServices

You certainly have a point.
Although I don’t know exactly how to use it properly, it’s best for all parties involved…

@raygulick

Immediately after activating the theme, you will see the homepage template issue mentioned in my other thread. For a non-techie user this already may be the reason to look for another theme. Not good for CP. So hopefully everything gets fixed, because although it’s a very basic theme, I think it’s ideal for CP (mostly because it matches the layout/styling of the CP site).

@Guido07111975
A lot of us can help you get GitHub figured out, it is not too bad, I avoided it for a long time myself, but have enough figured out to get by now.

I think there is ‘pressure’ to have a ‘ClassicPress’ theme, and having it look like the support sites plays into branding also. But as was mentioned, people are not just going to be able to choose that theme and have a site that looks like ClassicPress.net. I am not sure what the best route is, maybe a very simple ‘barebones’ theme is actually better, with the ClassicPress theme in there, but not as the default? In my own experience, I have never used a theme that was included with WordPress, so while having a solid default / fallback theme is important from a theme testing perspective, I do not have a strong opinion on the subject.

2 Likes

Agree.
Because the CP dev team doesn’t seem to be very large, maybe it’s best for now to update The ClassicPress Theme. Fix things and remove stuff that’s redundant. If @raygulick doesn’t step in, I’m willing to take a look at it. Have some experience.

2 Likes

Go for it! I’d recommend starting with an out-of-the-box blog-friendly theme with some style changes to mimic colors and fonts on classicpress.net. That would be a quicker, easier, and almost certainly cleaner approach than starting with the current ClassicPress theme.

I agree, it will not be that much work to duplicate current layout and features, but with a new code base. And if the board chooses another theme as default theme, the current users of The ClassicPress Theme will benefit from an update.

1 Like

I am working theme projects also, trying to get my theme ‘public ready’, which may be easy enough from a coding standards perspective, but it is a theme that was designed as an ‘all in one’ package for my sites, so is also a situation where trying to fix it may be problematic. Now I am working on a theme that is just a very basic framework to use as a starting point for these ideas.

2 Likes

For the short term I suggest to update current theme. Include fixes and remove redundant code. Max couple of hours work and I’m willing to do this.
But I think this is not the right place to discuss this further? Zulip is?

1 Like

Also on GitHub if you open pull requests.

2 Likes