How can I find the .php file for attachment image files? I noticed the "attachment.php" file is not in the Soledad files, so which file is for the "Attachment Page?"
Okay awesome! Thank you very much. I created a file "attachment.php" and put it in wp-content > themes > Soledad. I pasted the code into the file and it is working. Wordpress is pointing to that attachment.php file now. But, the only problem is now there is not image attachment. Everything else is there, header, footer, comments, etc., but no image attachment. What can I do?
Have you remove something in the code I sent? If yes, let's put it back and check it again. Seem you removed something to make it does't show attachment.
If you don't do anything, please send me:
- Your admin url
- Your admin account ( username and password )
- Your FTP account ( FTP host, FTP username, FTP password ) or your hosting account.
Hello,
How can I find the .php file for attachment image files? I noticed the "attachment.php" file is not in the Soledad files, so which file is for the "Attachment Page?"
Thanks!
Hi,
This theme doesn't supports for attachment.php - and by default, it load from single.php file.
If you want to change attachment.php file, let's create a new file attachment.php , open it and put this code to this new file:
<?php get_header();
$sidebar_position = 'right-sidebar';
$sidebar_opts = get_post_meta( get_the_ID(), 'penci_post_sidebar_display', true );
if( get_theme_mod( "penci_left_sidebar_posts" ) ) { $sidebar_position = 'left-sidebar'; }
if( $sidebar_opts == 'left' ) {
$sidebar_position = 'left-sidebar';
} elseif( $sidebar_opts == 'right' ) {
$sidebar_position = 'right-sidebar';
}
?>
<?php if( ! get_theme_mod( 'penci_disable_breadcrumb' ) ): ?>
<div class="container penci-breadcrumb single-breadcrumb">
<span><a class="crumb" href="<?php echo esc_url( home_url('/') ); ?>"><?php echo penci_get_setting( 'penci_trans_home' ); ?></a></span><i class="fa fa-angle-right"></i>
<span><?php the_title(); ?></span>
</div>
<?php endif; ?>
<div class="container container-single<?php if( get_theme_mod( 'penci_home_layout' ) == 'magazine-1' || get_theme_mod( 'penci_home_layout' ) == 'magazine-2' ): ?> container-single-magazine<?php endif;?><?php if ( ( penci_get_setting( 'penci_sidebar_posts' ) && $sidebar_opts != 'no' ) || $sidebar_opts == 'left' || $sidebar_opts == 'right' ) : ?> penci_sidebar <?php echo esc_attr( $sidebar_position ); ?><?php endif; ?><?php if( ! get_theme_mod( 'penci_disable_lightbox_single' ) ): ?> penci-enable-lightbox<?php endif; ?>">
<div id="main"<?php if ( get_theme_mod( 'penci_sidebar_sticky' ) ): ?> class="penci-main-sticky-sidebar"<?php endif; ?>>
<div class="theiaStickySidebar">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php /* Count viewed posts */ penci_set_post_views( $post->ID ); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php endwhile; endif; ?>
</div>
</div>
<?php if ( ( penci_get_setting( 'penci_sidebar_posts' ) && $sidebar_opts != 'no' ) || $sidebar_opts == 'left' || $sidebar_opts == 'right' ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
<?php get_footer(); ?>
NOTE IMPORTANT: Don't put any white space at the begin of that file - check this image
Best Regards,
PenciDesign
Okay awesome! Thank you very much. I created a file "attachment.php" and put it in wp-content > themes > Soledad. I pasted the code into the file and it is working. Wordpress is pointing to that attachment.php file now. But, the only problem is now there is not image attachment. Everything else is there, header, footer, comments, etc., but no image attachment. What can I do?
Hi,
Have you remove something in the code I sent? If yes, let's put it back and check it again. Seem you removed something to make it does't show attachment.
If you don't do anything, please send me:
- Your admin url
- Your admin account ( username and password )
- Your FTP account ( FTP host, FTP username, FTP password ) or your hosting account.
in a private reply. I will take it a look.
Best Regards,
PenciDesign
Hi,
Please send me more your admin URL. I can't login to your admin if I don't know admin url.
Best Regards,
PenciDesign