Blog

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.

[hr]

[blog category=”10″ style=”1″ posts_per_page=”1″ paging=”false” image_width=”280″ image_height=”180″ excerpt_length=”40″ read_more=”read more” show_category_list=”false” orderby=”rand”]

[clear]

Example shortcode:

[code][blog category=”1″ style=”1″ posts_per_page=”5″ paging=”false” image_width=”280″ image_height=”180″ excerpt_length=”60″ read_more=”read more” show_category_list=”false” orderby=”rand”][/code]

[hr]

[four_fifth] [blog category=”10″ posts_per_page=”1″ paging=”false” image_width=”514″ image_height=”200″ excerpt_length=”50″ read_more=”read more” show_category_list=”false” orderby=”rand”] [/four_fifth] [one_fifth_last] [/one_fifth_last]

[clear]

Example shortcode:

[code][blog category=”1″ posts_per_page=”5″ paging=”false” image_width=”415″ image_height=”200″ excerpt_length=”35″ read_more=”read more” orderby=”rand”][/code]

[hr]

Blog from Categories

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

Parameters

style
(int) (Optional) The post list layout style. Values: 1, 2
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_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

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"]

[hr]

Blog from Pages

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

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

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"]

[hr]

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]

Examples

Display random posts:

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

Display popular posts:

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

[hr]

Advanced Parameters

For advanced usage, you can add most parameters accepted by WP_Query . The shortcode can use any of these parameters which are string or an integer values. Arrays are not supported.

Example use of WP_Query s parameter used to return a query filtered by a search term.

s
(string) (Optional) Search string for filtering upon a given term.
cat
(string) (Optional) Include or exclude categories. Prefix with a ‘-‘ (minus) sign to exclude.
author
(int) (Optional) Results by author id.
Many, many more…
See all WP_Query parameters.

[clear]

Display posts based on search results:

[blog category="8" s="Lorem Ipsum"]

[clear]

Display all posts except those from a category by prefixing its id with a ‘-‘ (minus) sign:

[blog cat="-8"]

[clear]

Utilizziamo cookie tecnici per garantire il funzionamento del sito e, con il tuo consenso, cookie di tracciamento e profilazione. Puoi acconsentire all'uso di tutti i cookie o selezionare le tue preferenze. View more
Cookies settings
Accept
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active
Titolare del Trattamento dei Dati Roberto Olivieri, Via Caravaggio 13, 61039 San Costanzo, PU Indirizzo email: eremo@contemplazione.it Privacy & Cookie Policy di contemplazione.it Su questo sito vengono raccolte alcune informazioni sui navigatori con il fine di offrire gratuitamente l’esperienza migliore possibile dei contenuti visionati. La raccolta di informazioni avviene nel rispetto delle leggi: Raccolta dei dati: quali e come puoi evitarlo? Su questo sito raccolgo dati attraverso tre modalità:
  • modulo di contatto e commenti
  • modulo di iscrizione ai Feed
  • cookie di profilazione
  • cookie
Modulo di contatto e commenti In alcune pagine del sito, è presente un modulo di contatto che ti permette di scrivermi facilmente; in ogni post è possibile inserire un commento. Tramite questo tipo di modulo, raccolgo nome e email: questi dati non li conservo ma li uso esclusivamente per ricontattarti. Solo se il nostro rapporto continua, li inserisco nella mia rubrica personale. In ogni momento, potrai sempre chiedermi di non contattarti più e quindi di cancellare i dati. I dati che fornisci nei commenti non vengono mai utilizzati, senza eccezzioni. Modulo di iscrizione ai Feed Nella colonna di destra è presente un modulo che ti collega con il servizio di Feed Burner (Google) che raccoglie il tuo indirizzo mail e lo gestisce al fine di avvertirti dell'uscita di nuovi post: qui trovi la loro Privacy Policy Cookie I cookie sono piccoli file salvati nel tuo browser che contengono informazioni quali un identificatore univoco, la tua posizione geografica ecc. Ogni cookie ha una sua scadenza: alcuni posso durare anche anni, mentre altri scadono nel momento in cui chiudi il browser. I cookie possono essere di tre tipi:
  • tecnici: servono a migliorare la tua esperienza sul sito
  • analytics: servono a farmi capire le cose che apprezzi di più
  • di profilazione: servono a mostrarti annunci pubblicitari mirati basati sulle pagine che vedi
Alcuni cookie provengono da questo sito altri da siti esterni. Cookie tecnici Su questo sito uso i cookie tecnici per:
  • velocizzare il caricamento delle pagine
  • gestire la Privacy & Cookie Policy
Cookie analytics Su questo sito uso Google Analytics per raccogliere queste informazioni: - quali pagine e post risultano maggiormente letti; - il tempo di permanenza su un post/pagina. Altri dati sono deducibili da Analytics ma ad essi non faccio riferimento non essendo questo un sito commerciale o con finalità economiche. L’analisi di questi dati mi permette di migliorare il sito per andare incontro alle esigenze dei lettori. Cookie di profilazione Su questo sito uso uso i cookie di profilazione per:
  • integrare i social network
Integrare i social network: per poter inserire in questo sito i bottoni per condividere su Facebook, Twitter e Google+, i commenti di Facebook e il box che richiama la pagina Facebook, devo consentire a Facebook, Twitter e Google di installare dei cookie nel tuo browser. Facebook, Twitter e Google usano questi cookie per mostrarti annunci pubblicitari mirati quando navighi sui loro siti. Per dare il tuo consenso clicca su Ok nella barra che compare in basso nel sito. Se vuoi navigare in questo sito senza approvare questi cookie, usa la navigazione in incognito. // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ // < ![CDATA[ //
Save settings
Cookies settings