class="wp-block-image "
.wp-block-image img{
max-width: 100%;
height: auto;
}
or
.myclass img{
max-width: 100%;
height: auto;
}
class="wp-block-image "
.wp-block-image img{
max-width: 100%;
height: auto;
}
or
.myclass img{
max-width: 100%;
height: auto;
}
add in functions.php
add_theme_support( 'post-thumbnails' );
add_image_size('small-thumbnail', 350, 230, true);
add_image_size('post-image', 600, 400, true);
single.php
<?php the_post_thumbnail('post-image'); ?>
Display some contents in certain pages of wordpress only.
Hide contents from some pages.
<?php if(is_page(14)) {?>
display this.....
<?php } ?>
Create file
single.php
Referance: https://wordpress.org/support/topic/create-new-basic-single-php-template/
<?php while ( have_posts() ) : the_post(); ?>
POST TITLE
<h1 class="intro-title mb-4"><h1 class="page-title"><a href="
<?php the_permalink(); ?>"><?php the_title();?>
</a></h1>
POST CONTENT
<p>
<?php the_content(); ?>
</p>
<?php endwhile; ?>
Activating navigation menu and using it with code.
function.php
<?php echo get_home_url(); ?>
index.php
<?php
$defaults = array(
'container' => 'ul',
'theme_location' => 'primary-menu',
'menu_class' => 'nav navbar-nav '
);
wp_nav_menu( $defaults);
?>
or
Home Button in Navigation menu of wordpress
create new file
landing.php