WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Template
Custom Post messing up my slider (2 posts)

  1. dxiri
    Member
    Posted 2 years ago #

    I have this plugin installed along with the DeepFocus theme from Elegant Themes. I setup a full width post template using the following code:

    <?php
    /*
    Template Name Posts: Full Width Post
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content-full">
    	<div id="hr">
    		<div id="hr-center">
    			<div id="intro">
    				<div class="center-highlight">
    
    					<div class="container">
    
    						<?php get_template_part('includes/breadcrumbs'); ?>
    
    					</div> <!-- end .container -->
    				</div> <!-- end .center-highlight -->
    			</div>	<!-- end #intro -->
    		</div> <!-- end #hr-center -->
    	</div> <!-- end #hr -->
    
    	<div class="center-highlight">
    		<div class="container">
    
    			<div id="full" class="clearfix">
    
    					<?php if (get_option('deepfocus_integration_single_top') <> '' && get_option('deepfocus_integrate_singletop_enable') == 'on') echo(get_option('deepfocus_integration_single_top')); ?>
    					<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    						<div class="entry clearfix post full">
    							<?php $width = 185;
    								  $height = 185;
    								  $classtext = '';
    								  $titletext = get_the_title();
    
    								  $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
    								  $thumb = $thumbnail["thumb"]; ?>
    
    							<h1 class="title"><?php the_title(); ?></h1>
    							<?php get_template_part('includes/postinfo'); ?>
    
    							<?php if($thumb == '') echo('<div class="clear"></div>'); ?>
    
    							<?php if($thumb <> '' && get_option('deepfocus_page_thumbnails') == 'on') { ?>
    								<div class="post-thumbnail">
    									<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
    									<span class="overlay"></span>
    								</div> 	<!-- end .thumbnail -->
    							<?php }; ?>
    
    							<?php the_content(); ?>
    							<?php wp_link_pages(array('before' => '<p><strong>'.esc_html__('Pages','DeepFocus').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    							<?php edit_post_link(esc_html__('Edit this page','DeepFocus')); ?>
    						</div> <!-- end .entry -->
    					<?php endwhile; endif; ?>
    					<?php if (get_option('deepfocus_integration_single_bottom') <> '' && get_option('deepfocus_integrate_singlebottom_enable') == 'on') echo(get_option('deepfocus_integration_single_bottom')); ?>
    
    					<?php if (get_option('deepfocus_show_pagescomments') == 'on') comments_template('', true); ?>
    
    			</div> <!-- end #content-area -->
    
    		</div> <!-- end .container -->
    
    		<?php get_footer(); ?>

    And it works except for 1 thing, the slider I have setup get messed up. I dont have the website live at the moment (I am developing it locally) so I cant post a link, but I can share a screenshot to better clarify the issue.

    http://ompldr.org/vZDFpcg

    As you can see, the image gets out of the defined slider frame, causing that white block at the start and messing the layout.

    This doesnt happen when I change to the normal post layout, so the error should be on the full-width post template, I just cant find it.

    Any help would be greatly appreciated!

    thanks in advance!

    http://wordpress.org/extend/plugins/custom-post-template/

  2. dxiri
    Member
    Posted 2 years ago #

    I figured this out, the problem had nothing to do with the above code, the white line appearing there was regarding the post information, on the theme I use (DeepFocus from elegant themes), this part can be hidden with .post-meta{display: none;}

    For different themes is just a matter of finding the styling regarding that part and change it accordingly.

    Any more info I am more than happy to help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic