• I’m having an issue when I import albums from Bandcamp into my theme. I get duplicate album covers on the album page. I saw that someone had posted a similar issue and recommended copying the page.php file and removing a line of code, but I don’t have that line of code they are referring to. Here’s the code from my page.php file..

    <?php get_header(); ?>
    
    <div id="main-area">
    	<div class="container">
    		<div id="content-area" class="clearfix">
    			<div id="left-area">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', get_post_format() ); ?>
    
    				<?php
    					if ( comments_open() && 'on' == et_get_option( 'harmony_show_pagescomments', 'false' ) )
    						comments_template( '', true );
    				?>
    
    			<?php endwhile; ?>
    
    			</div> <!-- end #left-area -->
    
    			<?php get_sidebar(); ?>
    		</div> <!-- end #content-area -->
    	</div> <!-- end .container -->
    </div> <!-- end #main-area -->
    
    <?php get_footer(); ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    https://www.ads-software.com/extend/plugins/musopress-discography/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author eschnack

    (@eschnack)

    Ok, it’s getting the rest of the code from another file. Do you have a file in your theme called content-page.php or something similar? If so can you post the code from that as well?

    Plugin Author eschnack

    (@eschnack)

    Ok, I’m doing this off the top of my head without any testing, but I think it should work.

    Make a copy of page.php and rename it single-muso-album.php

    Change this line:
    <?php get_template_part( 'content', get_post_format() ); ?>
    to
    <?php get_template_part( 'content', 'muso-album' ); ?>

    Now make a copy of content.php and rename it content-muso-album.php, and delete everything from

    <div class=”post-thumbnail”>

    to

    </div> <!– end .post-thumbnail –>

    Let me know if it works.

    Thread Starter graphicenzo

    (@graphicenzo)

    I’m still seeing the 2 thumbnails. Here are the 2 files ..

    content-muso-album.php

    <?php
    
    /**
    
     * The template for displaying posts on archive pages
    
     *
    
     */
    
    ?>
    
    	<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix entry entry-content' ); ?>>
    
    	<?php
    
    		$thumb = '';
    
    		$width = (int) apply_filters( 'et_index_image_width', 260 );
    
    		$height = (int) apply_filters( 'et_index_image_height', 260 );
    
    		$titletext = get_the_title();
    
    		$thumbnail = get_thumbnail( $width, $height, '', $titletext, $titletext, false, 'Indeximage' );
    
    		$thumb = $thumbnail["thumb"];
    
    		$is_single = is_singular();
    
    		$postinfo = ! $is_single ? et_get_option( 'harmony_postinfo1' ) : et_get_option( 'harmony_postinfo2' );
    
    		$show_thumb = ! $is_single ? et_get_option( 'harmony_thumbnails_index', 'on' ) : et_get_option( 'harmony_thumbnails', 'on' );
    
    		if ( is_page() ) $show_thumb = et_get_option( 'harmony_page_thumbnails', 'false' );
    
    	?>
    
    	<?php if ( ! $is_single ) { ?>
    
    		<h2 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
    	<?php } else { ?>
    
    		<h1 class="title"><?php the_title(); ?></h1>
    
    	<?php } ?>
    
    	<?php
    
    		if ( $postinfo && ! is_page() && ( ! is_post_type_archive( 'gallery' ) && ! is_tax( 'gallery_category' ) ) ) {
    
    			echo '<p class="meta-info">';
    
    			et_postinfo_meta( $postinfo, et_get_option( 'harmony_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Harmony' ), esc_html__( '1 comment', 'Harmony' ), '% ' . esc_html__( 'comments', 'Harmony' ) );
    
    			echo '</p>';
    
    		}
    
    		if ( is_post_type_archive( 'gallery' ) || is_tax( 'gallery_category' ) ) {
    
    			$et_gallery_date = get_post_meta( get_the_ID(), '_et_gallery_date', true );
    
    			if ( '' != $et_gallery_date ) {
    
    				echo '<p class="meta-info">' . sprintf( __( 'Gallery Date: %1$s', 'Harmony' ), esc_html( date( et_get_option( 'harmony_date_format', 'M j, Y' ), $et_gallery_date ) ) ) . '</p>';
    
    			}
    
    		}
    
    	?>
    
    	<?php if ( '' != $thumb && 'false' != $show_thumb ) { ?>
    
    	<?php } ?>
    
    <?php
    
    	if ( $is_single ) :
    
    		the_content();
    
    		wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'Harmony' ), 'after' => '</div>' ) );
    
    	else :
    
    		if ( 'on' == et_get_option( 'harmony_blog_style' ) ) the_content('');
    
    		else echo '<p>' . truncate_post( 400, false ) . '</p>'; ?>
    
    		<a href="<?php the_permalink(); ?>" class="more"><?php esc_html_e( 'Read More', 'Harmony' ); ?></a>
    
    <?php
    
    	endif;
    
    ?>
    
    	</article> <!-- end .post-->

    single-muso-album.php

    <?php get_header(); ?>
    
    <div id="main-area">
    
    	<div class="container">
    
    		<div id="content-area" class="clearfix">
    
    			<div id="left-area">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', 'muso-album' ); ?>
    
    				<?php
    
    					if ( comments_open() && 'on' == et_get_option( 'harmony_show_pagescomments', 'false' ) )
    
    						comments_template( '', true );
    
    				?>
    
    			<?php endwhile; ?>
    
    			</div> <!-- end #left-area -->
    
    			<?php get_sidebar(); ?>
    
    		</div> <!-- end #content-area -->
    
    	</div> <!-- end .container -->
    
    </div> <!-- end #main-area -->
    
    <?php get_footer(); ?>
    Plugin Author eschnack

    (@eschnack)

    Can you send me your theme in a zip file? My email is eschnack at gmail dot com.

    Thread Starter graphicenzo

    (@graphicenzo)

    I just emailed it to you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicate Album Thumbnails’ is closed to new replies.