Plugin Last Modified Posts Shortcode

-

Shortcode „Last modified Posts“:

fully configurable, use as

(last-modified-posts-shortcode number=20)
[*last-modified-posts  number=20 …. … …] 

options to use (here you see the default values)

OPTION

DEFAULT VALUE

number

 10

query

  „“

order

  „DESC“

orderby

 „modified“

lmstart

 „<div >“

lmend

 „</div>“

title

 „“

textbeforelist

 „“

textbeforeitem

 „“

liststart

 „<ul>“

listend

 „</ul>“

itemstart

 „<li>“

itemend

 „</li>“

showdate

 „true“

spandate

 „<span >“

dateformat

„j. M Y  H:i“

textbeforedate

“ | „

textafterdate

“”

 

Explanation of Options

       

query = „“

use whatever query you want, e.g. query=“cat=2,6,17,28″ to show all posts with category 28. For further query-information please visit: WP-Codex Queries

If in addition the the option „orderby“ is set to „none“ you get an shortcode that does not show modified post-list but what-ever list you want to show. As the shortcode has its own wp_query build in it works in all places / templates, also in TEXT-WIDGEDS, beside is my frontpage footer widget shown using this shortcode

number = 10

number of posts shown in this list

 

order =  „DESC“   

orderby = „modified“

see WP-Codex: Orderby to use plugin more generic, not just as „modified-pages“ shotcode

 

lmstart = „<div class=lastmod>“

lmend = „</div>“

used as first html-tag around the shortcode.

 title =  „“

use html-style text, e.g. title=“<h3>Last modifed posts</h3>“

textbeforelist = „“

use html-style text that is shown under the title before the list

liststart = „<ul>“
listend = „</ul>“

use this html-tags to set the ul-list-style, e.g. liststart=“<ul class=iconarrow>“

itemstart = „<li>“
itemend = „</li>“

use this hatml-tags to set the list-style

textbeforeitem = „“

this option is missleading, the list is formated like    <li> textbeforeitem  <a href=“xxxxx“> some post title </a> </li>, so this option sets some text or html-code right befor the post-title.

showdate = „true“  

show the date of the post

spandate = „<span id=lastmod>“

the date of the post is html-tagged via <span> Postdate </span>. If you re-define this option and clear it by spandate=““ no span-tagging is performed for date

dateformat = „j. M Y  H:i“    

use the wordpress dateformat as shown in Codex

textbeforedate = “ | „

textafterdate = „“  

these texts are used for calling the get_modified_date() function in WordPress, see Codex

 

 

here the query-line

$q=’posts_per_page=‘ . $number . ‚&orderby=‘. $orderby . ‚&order=‘ . $order;
if ($query<>““)
  $q= $query . „&“ . $q;
// The Query
$the_query = new WP_Query( $q );

 

the only weekness I see is that I use „get_modified_date()“, this should be more generic as option so that you also can get result of the_time(). If anyone has demand on that pleas feel free to request.

 

suggestions & improvements are welcomed,  Aug/2011 Heli Retzek

 

[download_box]download the plugin:  last-modified-posts-shortcode[/download_box] [divider]
Dr.med. Helmut B Retzek
Dr.med. Helmut B Retzekhttp://www.retzek.at
Arzt für Allgemeinmedizin, multiple präventivmedizinische, schulmedizinische und komplementäre Zusatzausbildungen. Wissenschaftliche Arbeit und Forschungs-Beiträge. Zahlreiche Artikel und Vorträge.  Diese Website dokumentiert umfangreiche eigene Recherchen in der aktuellen medizinischen Forschung zum Zweck der Selbst-Weiterbildung und als Gedächtnis-Stütze. Mässige Legasthenie, daher Rechtschreib- und Beistrichfehler, bitte nicht kommentieren, wer es nicht aushält bitte einfach nicht lesen
Ärztekammer Disclaimer
Ă„rztekammmer Disclaimer die Oberösterreichische Ă„rztekammer moniert weite Teile diese Website als „aufdringlich, marktschreierisch und beim Laien den Eindruck medizinischer Exklusivität erweckend“. Dies ist keinesfalls beabsichtigt, die Website ist ein absichtsloses Weiterbildungsmedium von Dr. Retzek, der seine wissenschaftlichen Pubmed-Recherchen hier mit ärztlichen Kollegen unentgeltlich teilt, wofĂĽr Dr. Retzek von vielen Kollegen aus dem In- und Ausland regelmässig Anerkennung ausgesprochen bekommt. Dass Wissenschaftsrecherchen und Studien „das Standesansehen der Ă„rzte“ verletzen könnte, war Dr. Retzek nicht bewusst, er bedauert dies zutiefst und entschuldigt sich bei den betroffenen Kollegen.
zeige Kommentare oder schreibe selber einen Kommentar

Kommentar gerne erwĂĽscht wenn sie hilfreich fĂĽr Leser sind

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darĂĽber, wie deine Kommentardaten verarbeitet werden.