Answer the question
In order to leave comments, you need to log in
How to upload an image to a wordpress site?
Function file:
add_action( 'after_setup_theme', 'theme_register_nav_menu' );
function theme_register_nav_menu() {
add_theme_support( 'post-thumbnails', array( 'post' ) );
}
<?php the_post_thumbnail('thumbnail') ?>
Answer the question
In order to leave comments, you need to log in
To correctly upload files, you must give write access to the ./wp-content/uploads folder.
On the local machine, just execute chmod
chmod -R 777 ./wp-content/uploads
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question