Hello,
I am using Realistic theme on my site https://FullStuff.co
I want to edit few things Please help
1) On mobile devices in header, I want to show Text logo not img logo [Note: Only in mobile]
2) I want to show full-size thumbnails but in 300x300 dimension
thanks in advance
Need Help Regards Realistic Theme
Topics related to Realistic theme goes here.
- Asmi Khalil
-
- Posts: 779
- Joined: Fri Jun 26, 2015 7:13 am
- Display Name: Asmi Khalil
- Location: Tunisia
HI Mr John,
Thanks for using our theme Realistic
With this code:
Note that the "wp_is_mobile" function works by testing the User Agent. So even if you reduce your browser resolution on your desktop, you will still get image logo. You need to test this on a real mobile phone or tablet or use a browser plugin to change the User Agent.
To:
Note that here we changed the "featured" thumbnail size from 218X181 to 300X300.
Now you need to Regenerate Thumbnails. Don't freak out, there is a plugin that make the whole process a piece of cake
https://wordpress.org/plugins/regenerate-thumbnails
Here is a guide from our Support page: https://themient.com/support/migrating-wp-theme
Final step is to open /template-parts/content.php file and edit as follow:
Change line 15 from:
To:
And change line 13 from:
To:
And change line 20 from:
To:
Here is the full edited content.php code in case you messed up your file:
Thanks for using our theme Realistic

To do this, we need to edit the header.php file ( located in theme folder ). Simply open it with a code editor of your choice and replace this line of code ( line 26 ):1) On mobile devices in header, I want to show Text logo not img logo [Note: Only in mobile]
<?php realistic_logo(); ?>
<?php if ( !wp_is_mobile() ) {
realistic_logo();
} else {
printf( '<a href="%s rel="home">%s</a>', esc_url( home_url( '/' ) ), bloginfo( 'name' ) );
} ?>
First, you need to change thumb size inside functions.php file. Open it and change this code from ( line 148 ):2) I want to show full-size thumbnails but in 300x300 dimension
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'featured', 218, 181, true ); //featured image
add_image_size( 'small', 120, 120, true ); //small thumb
add_image_size( 'tiny', 70, 70, true ); //tiny thumb
}
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'featured', 300, 300, true ); //featured image
add_image_size( 'small', 120, 120, true ); //small thumb
add_image_size( 'tiny', 70, 70, true ); //tiny thumb
}
Now you need to Regenerate Thumbnails. Don't freak out, there is a plugin that make the whole process a piece of cake

Here is a guide from our Support page: https://themient.com/support/migrating-wp-theme
Final step is to open /template-parts/content.php file and edit as follow:
Change line 15 from:
<img width="218" height="181" src="<?php echo realistic_get_thumbnail( 'featured' ); ?>" class="attachment-featured wp-post-image" alt="<?php the_title_attribute(); ?>">
<img width="300" height="300" src="<?php echo realistic_get_thumbnail( 'featured' ); ?>" class="attachment-featured wp-post-image" alt="<?php the_title_attribute(); ?>">
<div class="post-img mdl-cell mdl-cell--4-col-desktop mdl-cell--4-col-tablet mdl-cell--4-col-phone">
<div class="post-img mdl-cell mdl-cell--5-col-desktop mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<div class="post-data mdl-cell mdl-cell--8-col-desktop mdl-cell--4-col-tablet mdl-cell--4-col-phone">
<div class="post-data mdl-cell mdl-cell--7-col-desktop mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<?php
/**
* Template part for displaying posts.
*
* @package Realistic
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post-box mdl-card mdl-shadow--2dp mdl-grid mdl-cell mdl-cell--12-col'); ?>>
<?php if ( is_sticky() ) {
echo '<div class="featured"><i class="icon icon-star"></i></div>';
} ?>
<div class="post-img mdl-cell mdl-cell--5-col-desktop mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<img width="300" height="300" src="<?php echo realistic_get_thumbnail( 'featured' ); ?>" class="attachment-featured wp-post-image" alt="<?php the_title_attribute(); ?>">
<?php $format = get_post_format( $post->ID );
realistic_post_format_icon( $format ); ?>
</a>
</div>
<div class="post-data mdl-cell mdl-cell--7-col-desktop mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<?php if ( current_user_can( 'edit_posts' ) ) { ?>
<button id="post-actions<?php the_ID(); ?>" class="post-actions mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<ul class="post-actions-menu mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="post-actions<?php the_ID(); ?>">
<?php edit_post_link( __( 'Edit', 'realistic' ), '<li class="mdl-menu__item">', '</li>'); ?>
<?php $post_type = get_post_type($post);
$delLink = wp_nonce_url( admin_url() . "post.php?post=" . $post->ID . "&action=delete", 'delete-' . $post_type . '_' . $post->ID); ?>
<li class="mdl-menu__item">
<a href="<?php echo $delLink; ?>"><?php _e( 'Delete', 'realistic' ); ?></a>
</li>
</ul>
<?php }
the_title( sprintf( '<h2 class="entry-title post-title mdl-card__title-text"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
<?php realistic_archives_meta( $post->ID ); ?>
<div class="entry-content post-excerpt">
<?php /* translators: %s: Name of current post */ ?>
<span class="mdl-typography--font-light mdl-typography--subhead">
<?php archives_excerpt(); ?>
</span>
</div><!-- .entry-content -->
<div class="moretag">
<a class="mdl-button mdl-js-button" href="<?php the_permalink(); ?>"><?php _e( 'View article...', 'realistic' ); ?></a>
</div>
</div><!-- .post-data -->
</article><!-- #post-## -->
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
Really Thanks @Asmi Khalil
one more thing I wanted ask but forgot about it, How to disable breadcrumb and "In" Category from single post
one more thing I wanted ask but forgot about it, How to disable breadcrumb and "In" Category from single post
- Asmi Khalil
-
- Posts: 779
- Joined: Fri Jun 26, 2015 7:13 am
- Display Name: Asmi Khalil
- Location: Tunisia
Well, this is pretty easy to achieve; We just need to edit /template-parts/content-single.php and remove:
And:
Be careful here; if you add or leave anything even a semicolon you will receive a PHP error. Make sure to delete the whole line ( line 14 ).
<div class="breadcrumb mdl-color-text--grey-500" xmlns:v="http://rdf.data-vocabulary.org/#"><?php realistic_breadcrumb(); ?></div>
_e(' in ', 'realistic');
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
You’re so helpful. Thanks for your guidance and support.
- Asmi Khalil
-
- Posts: 779
- Joined: Fri Jun 26, 2015 7:13 am
- Display Name: Asmi Khalil
- Location: Tunisia
Most welcome
I am glad that I helped you!

I am glad that I helped you!
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
Who is online
Users browsing this forum: No registered users and 1 guest
It is currently Fri Feb 22, 2019 8:37 pm