• Home
  • About Hope
  • Blog
  • Resources
    • Hope Minutes
  • VA Services
  • Contact
    • Skip to primary navigation
    • Skip to main content
    • Skip to primary sidebar

    You are here: Home / Shortcodes / Blog Shortcodes

    Blog Shortcodes

    Description

    [hr] [clear]

    Insert a blog post list using the blog shortcode. Add the shortcode to a page or other content area to produce a list of blog posts. Optional parameters allow customization of the display.

    [clear] [clear] [four_fifth] [blog category=”6,16,18,22″ posts_per_page=”1″ paging=”false” image_width=”545″ image_height=”150″ excerpt_length=”-1″ read_more=”-1″ show_category_list=”false” orderby=”rand”] [/four_fifth] [one_fifth_last] [/one_fifth_last] [clear]

    Example shortcode:

    [blog category="1" posts_per_page="2" paging="false" image_width="450" image_height="125" excerpt_length="-1" read_more="-1" orderby="rand"]

    [clear] [clear]

    Default Usage

    [hr]

    [blog]

    [clear] [clear]

    Blog from Categories

    [hr] [code][blog category=”7,8,9″][/code] [clear]

    Parameters

    category
    (string) The category ID’s to pull posts from. Can be entered as a comma separated list.
    images
    (bool) (Optional) Show featured image in blog list. (true/false)
    image_width
    (integer) (Optional) The featured image height. Set to “0” for auto.
    image_height
    (integer) (Optional) The featured image width. Set to “0” for auto.
    post_content
    (string) (Optional) Display excerpt or full post. Values: excerpt, full
    excerpt_length
    (integer) (Optional) The length of the excerpt, number of words to display. Set to “-1” for no excerpt.
    show_date
    (bool) (Optional) Show or hide the post date. (true/false)
    author_avatar
    (bool) (Optional) Show or hide the author avatar image. (true/false)
    author_link
    (bool) (Optional) Show or hide the author name and link. (true/false)
    comments_link
    (bool) (Optional) Show or hide the comments link. (true/false)
    show_category_list
    (bool) (Optional) Show or hide the list of categories assigned to the post. (true/false)
    show_tag_list
    (bool) (Optional) Show or hide the list of tags assigned to the post. (true/false)
    posts_per_page
    (integer) (Optional) The number of posts to display on each page.
    paging
    (bool) (Optional) Enable paging. (true/false)
    read_more
    (string) (Optional) Shows entered text at the end of the excerpt linking to full post. For example: read_more=”More…”
    [clear] [clear]

    Examples

    [clear]

    Posts from categories with paging and post details:

    [blog category="7,8,9" author_avatar="true" show_date="true" paging="true"]

    Posts from categories, full post no images:

    [blog category="7,8,9" post_content="full" images="false"]
    [clear]

    Blog from Pages

    [hr]

    Blogs may also be generated from pages using a list of page ID’s or the child pages from a parent page ID.

    [clear]

    Page Parameters

    post_type
    (string) (Required) Directs the query to use pages instead of posts. Must include the value “page”.
    page_id
    (string) The page ID’s to include. Can be entered as a comma separated list.
    post_parent
    (integer) (Optional) Show child pages of the selected parent. Similar to using a category for posts.
    [clear] [clear]

    Examples

    [clear]

    Pages from list of page ID’s:

    [blog post_type="page" page_id="10,11,12"]

    Child pages from parent page ID:

    [blog post_type="page" post_parent="9"]
    [clear]

    Order and Orderby Parameters

    order
    (string) (Optional) Designates the ascending or descending order of the “orderby” parameter.

    “ASC” – ascending order from lowest to highest values (1, 2, 3; a, b, c).
    “DESC” – descending order from highest to lowest values (3, 2, 1; c, b, a).
    orderby
    (string) (Optional) Sort posts by.

    ‘none’ – No order.
    ‘id’ – Order by post id.
    ‘author’ – Order by author.
    ‘title’ – Order by title.
    ‘date’ – Order by date. (default)
    ‘modified’ – Order by last modified date.
    ‘parent’ – Order by post/page parent id.
    ‘rand’ – Random order.
    ‘comment_count’ – Order by number of comments
    ‘menu_order’ – Order by Page Order.
    [clear] [clear]

    Examples

    [clear]

    Display random posts:

    [blog category="8" orderby="rand"]

    Display popular posts:

    [blog category="8" orderby="comment_count"]
    [clear]

    Additional blog information available on the blog information page »

    Primary Sidebar

    Hi There!

    Hi There!

    Hi there, I'm Hope! Thanks for stopping by my site! I'm grateful that you stopped and took a few minutes to visit.

    A little about myself...

    I'm a single mom, a professional, a Hope and Empowerment Coach, and a fighter of depression and anxiety. Here, I am ME. No more, no less. Come hang out with me. You're welcome here, just the way you are!

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    SUBSCRIBE

    Web Hosting

    Categories

    • Blog
    • Business
    • Depression
    • Entrepreneurship
    • Fullwidth
    • Lifestyle
    • Miscellaneous
    • Self-Love
    • Spirituality

    Archives

    SUBSCRIBE TO MY NEWSLETTER!

    Every month get a newsletter filled with uplifting stories of hope and productive tips!

    • Facebook
    • Instagram
    • Twitter
    • Pinterest

    © 2019

    We are using cookies to give you the best experience on our website.

    You can find out more about which cookies we are using or switch them off in settings.

    Powered by  GDPR Cookie Compliance
    Privacy Overview

    This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

    Strictly Necessary Cookies

    Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

    If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

    Cookie Policy

    More information about our Cookie Policy