Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #987383
    #987609

    Hey Joy,

    Open up single.php and search for following code:

    <div class='post_data'>
    <span class='categories'><?php the_category(', ') ?><?php edit_post_link('Edit', ', ', ''); ?></span>
    <span class='author'><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
    </div><!--end post data-->

    delete it and insert it before following line:

    </div><!--end entry-->

    Best regards,
    Jordan Shannon

    #988075

    Hi Shannon,

    Thank you so much for your help! Actually, I am not sure if I am looking in the wrong file, but the single.php that I have for the 4.4 version of Enfold – right in the root – does not contain any of the code you mention.

    Here is what I see on that file below, am I looking in the wrong place? The Theme update part mentions that I do have the latest version :/

    <?php
    	if ( !defined('ABSPATH') ){ die(); }
    	
    	global $avia_config;
    
    	/*
    	 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    	 */
    	 get_header();
    
    	$title  = __('Blog - Latest News', 'avia_framework'); //default blog title
    	$t_link = home_url('/');
    	$t_sub = "";
    
    	if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
    	{
    		$title 	= get_the_title($new); //if the blog is attached to a page use this title
    		$t_link = get_permalink($new);
    		$t_sub =  avia_post_meta($new, 'subtitle');
    	}
    
    	if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
    	
    	do_action( 'ava_after_main_title' );
    
    ?>
    
    		<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
    
    			<div class='container template-blog template-single-blog '>
    
    				<main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
    
                        <?php
                        /* Run the loop to output the posts.
                        * If you want to overload this in a child theme then include a file
                        * called loop-index.php and that will be used instead.
                        *
                        */
                            get_template_part( 'includes/loop', 'index' );
    						
    						$blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
    						
    						if(!$blog_disabled)
    						{
    	                        //show related posts based on tags if there are any
    	                        get_template_part( 'includes/related-posts');
    	
    	                        //wordpress function that loads the comments template "comments.php"
    	                        comments_template();
    						}
                        ?>
    
    				<!--end content-->
    				</main>
    
    				<?php
    				$avia_config['currently_viewing'] = "blog";
    				//get the sidebar
    				get_sidebar();
    
    				?>
    
    			</div><!--end container-->
    
    		</div><!-- close default .container_wrap element -->
    
    <?php get_footer(); ?>
    #988076

    Hi,

    If possible, please provide admin info in the private area so we can log in and look into the issue further.

    Best regards,
    Jordan Shannon

    #988078

    Thank you so much for looking into it, i just added the information in the private section =]

    • This reply was modified 6 years, 2 months ago by howjoyful.
    #988297

    Hi howjoyful,

    The place to look for the code is in includes/loop-index.php.

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #988313

    Hi Victoria,

    Thank you for looking into it, I just looked in includes/loop-index.php and I could not find the code there either, is it in a different file?
    Thank you for your help!

    #988351

    Hi howjoyful,

    Can you please post the credentials again?

    Best regards,
    Victoria

    #989017

    Thank you for checking this Victoria, here I am adding the credentials again.

    #989326

    Hi howjoyful,

    Can you please have the Appearance > Editor enabled?

    Here is how to do it

    Best regards,
    Victoria

    #990029

    I just did that Victoria, thank you for looking!

    #990251

    Hi howjoyful,

    Thank you.

    Best regards,
    Victoria

    #990488

    Thank you, Victoria! This would be the includes/loop-index.php file, right?

    #990982

    Hi,
    I checked the link and it is the includes/loop-index.php file.

    Best regards,
    Mike

    #992178

    Thank you so much for your help.

    I tried the fix but when I implement it, my post titles disappeared, I played with the code Victoria changed and I managed to erase the tags from the top and not to have the titles disappear, BUT I can’t make the tags show at the bottom of the post.

    I tried Victoria’s fix, but it either shows the categories at the bottom and erases the titles or (like I have them now) shows the title and no categories.
    Is there a way to have the categories show at the bottom?

    This is the code that it’s not working:

    //added by vic
    				    $cat_output = "";
    	            	
    	            	if(!empty($cats))
                        {
                            $cat_output .= '<span class="blog-categories minor-meta">';
                            $cat_output .= $cats;
                            $cat_output .= '</span>';
                            $cats = "";
                        }
    
                        // The wrapper div prevents the Safari reader from displaying the content twice  ¯\_(ツ)_/¯
                        echo '<div class="av-heading-wrapper">';
                            echo strpos($blog_global_style, 'modern-blog') === false ? $cat_output.$title : $title.$cat_output;
                        echo '</div>';
    //
    #992397

    Hi,
    If you would like to try a different approach, I tested this javascript on my localhost with the blog set to “Elegant” in the theme options. As long as you have the “blog-author” showing in your meta, which I see you do, this will move the categories below the date & author and leave the title at the top.
    It will work for archive pages and single pages.
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function move_categories(){
      ?>
      <script>
      jQuery(window).load(function(){
    jQuery( '.single .post-entry,.archive .post-entry' ).each(function() {
    jQuery( this ).find( '.blog-categories' ).insertAfter( jQuery(this).find('.blog-author') );
    });
    });
      </script>
      <?php
      }
      add_action('wp_footer', 'move_categories');

    that is after you restore the other file so the categories shows at the default top location.

    Best regards,
    Mike

    #992522

    Thank you SO MUCH, Mike!

    That worked like a charm! I restored the file added the function and the categories are exactly where I needed them to be! Thank you so much again =]

    #992641

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Moving the categories to the end of the post?’ is closed to new replies.