Typo3 München Wordpress Starnberg  Freelancer

Search
  • Blog
  • About
  • Services
  • Work
  • Contact
  • News
  • Articles
  • Twitter

  • Wordpress 3 Custom Post Types
  • Wordpress Admin Passwort zurücksetzen
  • Typo3 – Sprachen konfiguration (Typoscript)
  • Cross Browser CSS Transforms (IE Support)
  • Wordpress Attachments (Dateianhänge)
Blog Archiv
  • Typo3 – Auslagern von Typoscript in externe Datei
  • Typo3 – Einbinden von canonical Tag
  • Typo3 – Browserweiche (Conditional Comments)
  • Typo3 – onfocus=”blurLink(this)” in Sitemaps entfernen
  • Typo3 – Sitemap target definieren
Tutorials Archiv

27th November, 2009

Wordpress Attachments (Dateianhänge)

0 comments

Wordpress Attachments
Hier ein einfacher Code-Schnipsel, um Attachments (Dateianhänge) in einem WordPress-Theme anzuzeigen.

$args = array(
	'post_type' => 'attachment',
	'numberposts' => null,
	'post_status' => null,
	'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
	foreach ($attachments as $attachment) {
		echo apply_filters('the_title', $attachment->post_title);
		the_attachment_link($attachment->ID, false);
	}
}

Fügt einfach den folgenden Code innerhalb eines Wordpress Loops ein und deine Dateianhänge werden angezeigt.
Desweiteren ist es auch möglich den Code irgendwo in die post.php Datei einzufügen.

Credit: wprecipes.com

Tags: attachment, wordpress

Kategorie wordpress | 0 comments



RSS
Follow me on Twitter

About this blog

This website was developed by Markus Bäck based in Tutzing (Starnberger See) using XHTML, CSS, JavaScript and PHP, handcoded in Notepad++. Powered by the Almighty Wordpress.

Resources

  • CSS-Tricks
  • Smashing Magazine

Blogroll

  • faktor23.de
  • Freelancer Typo3
  • maize.design
  • musichearts.org

Work

  • stream5 GmbH
  • Guido Schindler Delikatessen | Feinkost - Bistro - Partyservice - Starnberger See
  • ViCommerce GmbH
Copyright © 2009 just4freaks.de Designed and managed by Webdesign Starnberg