• Dear Pros,

    Mahdara Blog

    1st time I’m implementing wordpress in web development. Created custom theme and placed contents.

    I have blog, event calender and video & picasa galleries.

    Since I’m using Event Calender, tubepress and PhotoXhibit plugins in pages on custom theme.

    The problem is “page_title” is misplaced into “main” section instead of outside of it as in the template.

    The Blog section is just fine as it is.

    <?php get_header(); ?>
    
    				<div id="content-top"></div>
                	 <div id="content-inner">
                     	 <!-- begin of page title -->
                         <div id="page-title" style="padding-left:35px;">
                         <?php if(is_single()) { ?>
                            <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
                        <?php } else { echo "<h3>Mahdara Blog</h3>"; } ?>
                        </div>
                        <!-- end of page title --> 
    
                        <!-- begin of main -->
                     	<div id="main">
                        	<div id="main-left">
                    			<!--<div>-->
                                <?php
    							if (is_category()) {
    								echo '<h1 class="listhead">';
    								_e("Category", "notesblog");
    								echo ' <strong>';
    								single_cat_title();
    								echo '</strong></h1>';
    								} if (is_tag()) {
    								echo '<h1 class="listhead">';
    								_e("Tag", "notesblog");
    								echo ' <strong>';
    								single_tag_title();
    								echo '</strong></h1>';
    								} if (is_search()) {
    								echo '<h1 class="listhead">';
    								_e("Your <strong>search result</strong>", "notesblog");
    								echo '</h1>';
    							}
    							?>
                                <!--</div>-->
    
                           <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                           <!-- blog post title : begin -->
                           <div id="page-title1" style="padding-top:10px; padding-bottom:10px; background:#F93;">
                            	<h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
                        	</div>
                        <!-- blog post title : end -->
                            <p style="text-align:justify;">
                            <?php the_content(); ?>
                            </p>
                            <p>
    							<?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?> | <?php the_category(', '); ?> | <?php comments_number('No comment', '1 comment', '% comments'); ?>
                            </p>
                    		<?php endwhile; else: ?>
                            		<h2>Woops...</h2>
    					    		<p>Sorry, no posts we're found.</p>
    			    		<?php endif; ?>
    			    		<p align="center"><?php posts_nav_link(); ?></p>
                          </div>
                          <!-- end of main-left --> 
    
                            	<?php get_sidebar(); ?>
    
                            <!-- end of main-right -->
                            <div class="clr"></div>
                        </div>
                        <!-- end of main -->
                     </div>
    get_footer()

    Any help will be appriciated
    Regards
    Bharadwaj Bangalore

Viewing 1 replies (of 1 total)
  • It looks like you have it twice, however, the way you currently have it is fine, you just need to fix some padding issues for the title.

    The first instane of the page title doesn’t appeal because it is not inside the loop, so it’s invalid.

    The second one does appear because it IS part of the loop.

    In My opinion, it looks better how it looks right now, than if the title is by itself and pushed everything else down.

    If you still want to do it that way, then change the first instance of <?php the_title(); ?> to <?php wp_title(); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘newbie : displaced content on custom theme in my website – help please’ is closed to new replies.