Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1406101

    Hi guys! i need to move post post date from bottom of post to top.
    and i need to dates: post creation and post modified.
    how to do it?

    #1406134

    Hey mischael1,

    Thank you for the inquiry.

    We may need to inspect the site in order to provide the proper modifications. Please provide the site URL in the private field.

    To display the modified date, you have to edit the includes > loop-index.php file around line 447 and use the get_the_modified_date function.

    $meta_time .=		apply_filters( 'avf_loop_index_meta_time', get_the_time( get_option( 'date_format' ) ), $current_post['the_id'], get_option( 'date_format' ) );
    

    Please check the following thread for more info.

    // https://kriesi.at/support/topic/enfold-latest-portfolio-widget-publish-time/#post-1302798

    Best regards,
    Ismael

    #1407841

    Sorry for delay.
    Check private field for site accesses.

    If you pleased I will expand the question.
    I need both dates under title: creation date and last modified date with little text before each.

    On screenshot under title is categories, but I’m not sure, possible i will hide it by theme blog setting (if it matter).
    what i need

    #1408099

    Hi,
    Thank you for your patience and the link to your site, I assumed that you wanted the creation date and last modified date in a single line so I added this to your child theme functions.php:

    function add_postdate_after_single_post_titles() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
    	var publishdate = '<?php echo get_the_time(get_option('date_format'));?>';
    	var modifieddate = '<?php echo get_the_modified_date( get_option('date_format'));?>';
    	$('#top.single-post').each(function () {
    		$('<time class="date-container minor-meta updated">Publish Date: ' + publishdate + ' Modified Date: ' + modifieddate + '</time>').css({'top':'-25px','position':'relative'}).insertAfter('.blog-categories.minor-meta');
    	});	
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'add_postdate_after_single_post_titles');

    and now both are showing:
    Enfold_Support_2127.jpeg

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.