Vote count:
0
I am creating a wordpress theme which the folder 'wordpress' is located on my 'documents' folder. The featured image option there works like a charm. When I install the theme on a new database (copy, paste on the theme folder) the option to upload a featured image is gone or not showing up whilst the functions.php folder hasn't been changed. Anyone got a solution for this problem?
I have included the functions.php file and the index.php file (which is the same on the new database, because I copy, paste the theme folder to the new wp-content->themes folder.
functions.php
<?php
function blvck_resources() {
wp_enqueue_style('style', get_stylesheet_uri());
load_theme_textdomain( 'majestic', get_template_directory() . '/languages' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
}
add_action('wp_enqueue_scripts', 'blvck_resources');
require get_template_directory() . '/customizations/custom-header.php';
index.php
<?php
get_header();
if (have_posts()) :?>
<div id="freewall" class="free-wall">
<?php
while (have_posts()) : the_post();
?>
<a href="<?php the_permalink() ?>">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="brick">
<span><?php the_post_thumbnail(); ?></span>
<div class="info">
<h4 class="post-title"><?php the_title(); ?></h4>
<h6 class="post-date"><?php the_time(get_option('date_format')); ?></h6>
</div>
</div>
</article>
</a>
<?php endwhile;
?>
</div>
<?php
else :
echo '<p>No content found</p>';
endif;
?>
<script type="text/javascript" src="wp-content/themes/Majestic/js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="wp-content/themes/Majestic/js/freewall.js"></script>
<script type="text/javascript" src="wp-content/themes/Majestic/js/centering.js"></script>
<script type="text/javascript">
$(window).load(function() {
var wall = new freewall("#freewall");
wall.reset({
selector: '.brick',
animate: true,
cellW: 300,
cellH: 'auto',
onResize: function() {
wall.fitWidth();
}
});
// $('#freewall').find('.brick img').hide();
wall.fitWidth();
});
</script>
<?php
get_footer();
?>
asked 2 mins ago
Featured image option is not showing up in the wordpres dashboard
Aucun commentaire:
Enregistrer un commentaire