Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    The post date is displayed using the format set under Settings -> General, from the admin panel. It’s quite customizable, but will change the date format for the whole site. I’ll try to add a parameter so you can display the dates differently, in the next update.

    Could you explain what you mean by “offset”? Do you mean like spaces/tabs, or offset the loop by a number of posts..?

    Thread Starter alexmkubik

    (@alexmkubik)

    Wow! Thanks. great response time, too!

    Terribly sorry… “post_offset”, number of posts in the loop…

    Plugin Author Eliot Akira

    (@miyarakira)

    Yes, you can limit the number of posts to show in the query loop, by setting the count parameter. To show the titles of the 3 most recent posts:

    [loop type="post" count="3"]
        [content field="title"]
    [/loop]


    I added a date_format parameter to display post dates in a custom format. Please see the latest plugin update. Here’s an example:

    [loop type="post"]
        [content field="title"] - Posted on: [content field="date" date_format="d.m.Y"]
    [/loop]

    This will show the post dates in European style (day, month, year): 18.11.2013. If you need to display characters as they are without formatting, use double backslashes to escape them: Y/m/d \\a\\t g:i A will show 2013/11/17 at 11:06 PM.

    For more information on how to create date formats, please see the Codex: Formatting Date and Time.

    Thread Starter alexmkubik

    (@alexmkubik)

    Wow, date thing looks spectacular!

    For offset though, I am wondering about offsetting the loop, like using the “post_offset” parameter…

    I’ve already used your count parameter to get a specific number of posts… but what about if I DON’t want the last three posts? what if I want to start the loop four posts ago? You can do it in get_posts and in WP_query, but offset and post_offset don’t work in the shortcode.

    Plugin Author Eliot Akira

    (@miyarakira)

    Sure, I added the offset parameter to the loop shortcode. Please see version 0.3.8. To skip the first 3 posts in the query:

    [loop type="post" offset="3"]
        [content field="title"]
    [/loop]
    Thread Starter alexmkubik

    (@alexmkubik)

    Looking back, I was terribly unclear. THanks!

    Thread Starter alexmkubik

    (@alexmkubik)

    You, sir, are brilliant!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Offset’ is closed to new replies.