• Resolved sledge81

    (@sledge81)


    Hi, this is a great plugin to have and quite handy. Can you help me with some modification?

    The current set up i’m using is this inside the single post template.
    Updated on <span class="update-date"><?php echo get_the_last_modified_timestamp() ?></span>

    This outputs to: Updated on Mar 9, 2017 @ 10:20

    I’d like to make the output to 09/03/2017 instead.

    Plugin instructions get a bit complex once it goes into using different formats.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Evan Mattson

    (@aaemnnosttv)

    Sure, no problem. I suppose it might help to add some examples to the FAQ!

    You want to do something like this:

    
    Updated on <span class="update-date"><?php 
        the_last_modified_timestamp('single-post', array(
            'format' => '%date%',
            'datef'  => 'd/m/Y',
        ));
    ?></span>
    

    Here single-post is the name of the context, but is not really that important in this case as the array overrides the configuration of that context.

    Thread Starter sledge81

    (@sledge81)

    brilliant thanks!!

    I had to modify single-post so that it matches the template where it is called from. In my case it was content-single

    Thanks once again and a great plugin to have!

    Plugin Author Evan Mattson

    (@aaemnnosttv)

    Thank you!

    The name of the context only matters if you are using one of the included contexts as defined by the plugin, or one of your own that you can add by a filter.

    So in your case, content-single can be just about anything.

    Glad it was able to fit your needs! Cheers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Formating template tag output’ is closed to new replies.