Site5

Menu

Support Forums

How to make news headline ticker in front page

Home Forums SimpleCorp How to make news headline ticker in front page

Tagged: 

This topic contains 57 replies, has 10 voices, and was last updated by  liuchunkai 1 day ago.

Viewing 15 posts - 16 through 30 (of 58 total)
  • Author
  • #12409

    adhityafernando
    Participant

    Yes guido, nothing changed…
    I don’t know how to fix it. Help…guido.

    Here is the code:

    <?php
    /*
    The comments page for Site5 Framework
    */
    
    // Do not delete these lines
      if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
        die ('Please do not load this page directly. Thanks!');
    
      if ( post_password_required() ) { ?>
      	<div class="help">
        	<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.','site5framework'); ?></p>
      	</div>
      <?php
        return;
      }
    ?>
    
    <!-- You can start editing here. -->
    
    <?php if ( have_comments() ) : ?>
    	
    	<h3 id="comments"><?php comments_number('<span>No</span> Comments', '<span>One</span> Comment', '<span>%</span> Comments' );?></h3>
    
    	<nav id="comment-nav">
    		<ul>
    	  		<li><?php previous_comments_link() ?></li>
    	  		<li><?php next_comments_link() ?></li>
    	 	</ul>
    	</nav>
    	
    	<ol class="commentlist">
    		<?php wp_list_comments('type=comment&callback=site5framework_comments'); ?>
    	</ol>
    	
    	<nav id="comment-nav">
    		<ul>
    	  		<li><?php previous_comments_link() ?></li>
    	  		<li><?php next_comments_link() ?></li>
    		</ul>
    	</nav>
      
    	<?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ( comments_open() ) : ?>
        	<!-- If comments are open, but there are no comments. -->
    
    	<?php else : // comments are closed ?>
    	<!-- If comments are closed. -->
    	<p class="nocomments"><?php _e('Comments are closed.','site5framework'); ?></p>
    
    	<?php endif; ?>
    
    <?php endif; ?>
    
    <?php if ( comments_open() ) : ?>
    
    <section id="respond" class="respond-form">
    
    	<h3 id="comment-form-title" class="h2"><?php _e( 'So, what do you think ?', 'site5framework' ); ?></h3>
    	
    	<div id="cancel-comment-reply">
    		<p class="small"><?php cancel_comment_reply_link(); ?></p>
    	</div>
    
    	<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
      	<div class="help">
      		<p><?php _e("You must be  ", "site5framework"); ?> <a href="<?php echo wp_login_url( get_permalink() ); ?>"><?php _e("logged in ", "site5framework"); ?></a> <?php _e("to post a comment. ", "site5framework"); ?></p>
      	</div>
    	<?php else : ?>
    
    	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    	
    	<div id="comment-form-elements">
    
    	<?php if ( is_user_logged_in() ) : ?>
    
    	<div class="comments-logged-in-as"><?php _e("Logged in as  ", "site5framework"); ?><a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account"><?php _e("Log out &raquo; ", "site5framework"); ?></a></div>
    	
    	
    	<?php else : ?>
    	
    		<div class="one-fourth">
    		  <label for="author"><?php _e("Your Name ", "site5framework"); ?></label>
    		  <input class="text" type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    		</div>
    		
    		<div class="one-fourth">
    		  <label for="email"><?php _e("Your Mail ", "site5framework"); ?></label>
    		  <input class="text" type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    		</div>
    		
    		<div class="one-fourth last">
    		  <label for="url"><?php _e("Your Website ", "site5framework"); ?></label>
    		  <input class="text" type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" tabindex="3" />
    		</div>
    	
    	<?php endif; ?>
    	
    		<div class=""> 
    			<label for="comment"><?php _e("Message ", "site5framework"); ?></label> 
    			<textarea name="comment" id="comment" tabindex="4"></textarea>
    		</div>
    	
    	
    	  <input name="submit" type="submit" id="submitcomment" class="button small steel_blue round" tabindex="5" value="<?php _e("POST COMMENT", "site5framework"); ?>" />
    	  <?php comment_id_fields(); ?>
    	
    	<?php do_action('comment_form', $post->ID); ?>
    	</div>
    	</form>
    	
    	<?php endif; // If registration required and not logged in ?>
    </section>
    
    <?php endif; // if you delete this the sky will fall on your head ?>
    
    #12413

    Guido
    Participant

    To determine if the comments template causes this (which does contain 2 small bugs, the /li in stead of /div), please turn allow comments off, so the commentsform is not displayed anymore.
    Is the footer still misaligned?

    Guido

    #12422

    adhityafernando
    Participant

    Guido, nothing change after I turn off comments. Footer remain still mis-aligned.
    Here is the screenshot: http://i988.photobucket.com/albums/af4/Adhitya_Fernando/comments_zpsc888f261.png
    Oh, how come….

    Is there still any other ide, Guido?

    #12424

    adhityafernando
    Participant

    Guido, try to acces my website again. I recently asked the server administrator to open acces from your country..
    http://www.adhityafernando.com

    #12433

    Guido
    Participant

    Yes, site does display again.
    So adding that in file comments didn’t solve it..
    I notice a small smiley on left bottom of a single post, did you add plugin in footer or did you adjust file footer?

    Guido

    #12434

    adhityafernando
    Participant

    Yes. So, how’s my website progress you think? Is it look nice?

    Small smiley? I don’t do any change to single post and footer lately.

    Guido, please tell me what should I do?? This is very annoying seeing my footer misaligned.

    #12435

    adhityafernando
    Participant

    Guido, this is SinglePost file:

    <?php get_header(); ?>
    			
    			<div id="content" class="container clearfix"> 
    				
    				<!-- page header -->
    				<div class="container clearfix ">
    					<?php
    					// display the blog page image header or fallback to the default one.
    					$blogPageID = of_get_option('sc_singledesc');
    					$thumbId = get_image_id_by_link ( get_post_meta($blogPageID, 'snbpd_phitemlink', true) );
    					$thumb = wp_get_attachment_image_src($thumbId, 'page-header', false);
    					?>
    					<?php if(of_get_option('sc_showpageheader') == '1'  && get_post_meta($blogPageID, 'snbpd_ph_disabled', true) != 'on' ) : ?>
    						<?php if(get_post_meta($blogPageID, 'snbpd_phitemlink', true)!= ''  ) : ?>
    						<img class="intro-img" alt=" " src="<?php echo $thumb[0] ?>" alt="<?php the_title(); ?>"  />
    						<?php elseif (of_get_option('sc_pageheaderurl') !='' ): ?>
    
    							<?php
    							$thumbId = get_image_id_by_link ( of_get_option('sc_pageheaderurl') );
    							$thumb = wp_get_attachment_image_src($thumbId, 'page-header', false);
    							?>
    							<img class="intro-img" alt=" " src="<?php echo $thumb[0] ?>" alt="<?php the_title(); ?>"  />
    
    						<?php else: ?>
    
    							<img class="intro-img" alt=" " src="<?php echo get_template_directory_uri(); ?>/library/images/inner-page-bg.jpg" />
    
    						<?php endif ?>
    					<?php endif ?>
    					
    
    				<div class="three-fourth">
    
    					<h1><?php _e("Our Blog", "site5framework"); ?> 
    					<?php
    					$singledescpage = of_get_option('sc_singledesc');
    					$singledesc = get_post_meta($singledescpage, 'snbpd_pagedesc');
    					?>
    					
    					<?php if (!empty($singledesc)) { 
    					echo ' / <span>';
    					echo $singledesc[0].'</span>';
    					}?>
    					</h1>
    					
    
    					<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    					<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
    						
    						<div class="resize">
    						<?php 
    						 if ( has_post_thumbnail()) {
    						   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
    						   echo '<a data-rel="prettyPhoto" href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
    						   the_post_thumbnail('full');
    						   echo '</a>';
    						 }
    						 ?>
    						</div>
    
    						<div class="entry-meta">
    							<time class="post-date" datetime="<?php echo the_time('Y-m-d'); ?>">
    								<span class="post-month"><?php the_time('F'); ?></span>
    								<strong class="post-day"><?php the_time('d'); ?></strong>
    								<span class="post-year "><?php the_time('Y'); ?></span>
    							</time>
    							
    							<ul>
    								<li><span class="title"><?php _e("In", "site5framework"); ?>:</span> <?php the_category(', '); ?></li>
    								<li><span class="title"><?php _e("Posted By", "site5framework"); ?>:</span> <?php the_author_posts_link(); ?></li>
    								<?php $post_tags = wp_get_post_tags($post->ID);
    									if(!empty($post_tags)) { ?>
    								<li>
    									<span class="title"><?php _e("Tags", "site5framework"); ?>:</span>
    									<span class="tags">
    										<?php the_tags('', ', ', ''); ?>
    									</span>
    								</li>
    								<?php } ?>
    								<li><span class="title"><?php _e("Comments", "site5framework"); ?>:</span> <?php comments_popup_link(__('0', 'site5framework'), __('1', 'site5framework'), __('%', 'site5framework')); ?></li>
    							</ul>
    						</div>
    
    						<div class="entry-body"> 
    							
    
    							<header>
    
    								<h3 class="permalink"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'site5framework' ); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    				 Total <?php if(function_exists('the_views')) { the_views(); } ?> 				
    							</header> <!-- end article header -->
    
    						
    							<?php the_content(); ?>
    
    						</div> <!-- end entry-body -->
    
    						
    											
    					</article> <!-- end article -->
    						
    					<?php if(of_get_option('sc_authorbox') == '1') : ?>
    					<div class="author clearfix">
    				        <div class="author-gravatar">
    				            <?php echo get_avatar( $post->post_author, 64 ); ?>       
    				        </div>
    				        <div class="author-about">
    				        	<h4>
    				        	<?php if(get_the_author_meta( 'first_name') != ''  &&  get_the_author_meta( 'last_name') != '' ) : ?>
    				            	<?php the_author_meta( 'first_name'); ?> <?php the_author_meta( 'last_name'); ?> 
    				       		<?php else: ?>
    				           		<?php the_author_meta( 'user_nicename'); ?> 
    				       		<?php endif; ?>
    				       		</h4>
    				            <p class="author-description"><?php the_author_meta( 'description' ); ?></p>
    				        </div>
    				    </div>
    					<?php endif ?>
    						
    						<?php comments_template(); ?>
    						
    						<?php endwhile; ?>			
    						
    						<?php else : ?>
    						
    						<article id="post-not-found">
    						    <header>
    						    	<h1><?php _e("No Posts Yet", "site5framework"); ?></h1>
    						    </header>
    						    <section class="post_content">
    						    	<p><?php _e("Sorry, What you were looking for is not here.", "site5framework"); ?></p>
    						    </section>
    						</article>
    
    						<?php endif; ?>
    						
    					
    				</div><!-- three-fourth -->
    
    				<div class="one-fourth last">
    					<?php get_template_part( 'blog', 'sidebar' ); ?>
    				</div>
        
    			</div> <!-- end #content -->
    <?php get_footer(); ?>
    #12436

    adhityafernando
    Participant

    And this is footer file:

    			<!-- begin #footer -->
    			<footer id="footer">
    			
    				<div class="container clearfix">
    					
    					<?php if ( is_active_sidebar( 'footer-sidebar' ) ) : ?>
    
    						<?php dynamic_sidebar( 'footer-sidebar' ); ?>
    
    					<?php else : ?>
    
    						<!-- This content shows up if there are no widgets defined in the backend. -->
    						
    						<div class="one-fourth">
    						
    							<!-- This content shows up if there are no widgets defined in the backend. -->
    			
    							<div class="help">
    							
    								<p>
    									<?php _e("Please activate some Widgets.", "site5framework"); ?>
    
    									<?php if(current_user_can('edit_theme_options')) : ?>
    									<a href="<?php echo admin_url('widgets.php')?>" class="add-widget"><?php _e("Add Widget", "site5framework"); ?></a>
    									<?php endif ?>
    								</p>
    							
    							</div>
    						
    						</div>
    
    					<?php endif; ?>
    					
    					
    					
    				</div> <!-- end #footerWidgets -->
    				
    				<!-- begin #copyright -->
    				<div id="copyrights">
    					<div class="container clearfix">
    
    						<span class="right">
    							<a class="backtotop" href="#">↑</a>
    						</span>
    
    						
    						<?php if(of_get_option('sc_footer_copyright') == '') { ?>
    						&copy; <?php bloginfo('name'); ?> is powered by <a href="http://wordpress.org/" title="WordPress">WordPress</a> <span class="amp">&</span> <a href="http://www.site5.com" title="SimpleCorp">SimpleCorp</a>.
    						<?php } else { ?>
    						<?php echo of_get_option('sc_footer_copyright')  ?>
    						<?php } ?>
    						<!-- Site5 Credits-->
    						<br>The <a href="http://www.adhityafernando.com/">Success Driven Professional</a>. A journey of <a href="http://www.facebook.com/president.adhityafernando"><strong>Dream</strong></a> come <a href="http://www.facebook.com/Mr.AdhityaFernando"><strong>True</strong></a>. 
    
    						
    					</div>
    				</div>
    				<!-- end #copyright -->
    				
    			</footer> <!-- end footer -->
    		
    		</div> <!-- end #container -->
    		
    		<!-- scripts are now optimized via Modernizr.load -->
    		<script src="<?php echo get_template_directory_uri(); ?>/library/js/scripts.js" type="text/javascript"></script>
    		
    		<!--[if lt IE 7 ]>
      			<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
      			<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
    		<![endif]-->
    		
    		<?php wp_footer(); // js scripts are inserted using this function ?>
    		
    	</body>
    
    </html>
    #12439

    Guido
    Participant

    Your footer code is fine.
    I think it’s a plugin that causes this. I notice you use a stats plugin and social share plugin, deactivate this and see what happens.

    Guido

    #12451

    adhityafernando
    Participant

    Hi Guido,
    Problem not yet solved..
    I’ve deactivate almost all of my plugin but it doesn’t make change. You could see here the rest of my active plugin: http://i988.photobucket.com/albums/af4/Adhitya_Fernando/plugin_zps671235b4.png
    and I’m pretty sure that the rest plugin is not related to that problem.

    Do you have any other idea?
    Or if you need access to my site to fix this sure I’ll give you.

    #12472

    Guido
    Participant

    Are you sure you changed the comments.php (/div in stead of /li)?
    Because as you can see on a single post the footer is left-aligned the same as comments-form above footer.

    If you are 100% sure try adding this in Theme Options > Custom CSS:
    #footer {clear: both;}

    Guido

    #12482

    adhityafernando
    Participant

    Yes I changed it, Guido.

    100 & sure. I’ve try to add that code to custom css and still nothing change.
    Oh no, what cause this actually….

    #12496

    Guido
    Participant

    To determine if it’s file comments that causes this please open php file single and remove:
    <?php comments_template(); ?>

    Guido

    #12549

    adhityafernando
    Participant

    Hi Guido, sorry for my late reply.

    I’ve tried to delete that code but still does’t make change.
    Here is the preview: http://i988.photobucket.com/albums/af4/Adhitya_Fernando/Comment_zps162be17d.jpg

    So, what should I do next?

    #12553

    Guido
    Participant

    It only occurs at a single post page
    You did not adjust file single
    It’s not the comments form
    Only thing it could be is a plugin that’s displayed on single post only.. social media buttons for example.

    Guido

Viewing 15 posts - 16 through 30 (of 58 total)

You must be logged in to reply to this topic.