Hi!
Ich habe dieses tolle Snippet bei mir eingebaut:
PHP
[COLOR=#000000][COLOR=#0000BB]<?php
[/COLOR][COLOR=#FF8000]/*
Template Name: Bilder
*/
[/COLOR][COLOR=#0000BB]?>
[/COLOR]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de">
<head>
...
[COLOR=#0000BB]<?php
[/COLOR][COLOR=#007700]global [/COLOR][COLOR=#0000BB]$wp_query[/COLOR][COLOR=#007700];
[/COLOR][COLOR=#0000BB]$new_query [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]array_merge[/COLOR][COLOR=#007700]( array( [/COLOR][COLOR=#DD0000]'post_type' [/COLOR][COLOR=#007700]=> [/COLOR][COLOR=#DD0000]'attachment'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'post_status'[/COLOR][COLOR=#007700]=>[/COLOR][COLOR=#DD0000]'inherit'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'post_mime_type'[/COLOR][COLOR=#007700]=>[/COLOR][COLOR=#DD0000]'image' [/COLOR][COLOR=#007700]), [/COLOR][COLOR=#0000BB]$wp_query[/COLOR][COLOR=#007700]->[/COLOR][COLOR=#0000BB]query [/COLOR][COLOR=#007700]);
unset( [/COLOR][COLOR=#0000BB]$new_query[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]'pagename'[/COLOR][COLOR=#007700]] );
unset( [/COLOR][COLOR=#0000BB]$new_query[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]'page_id'[/COLOR][COLOR=#007700]] );
[/COLOR][COLOR=#0000BB]query_posts[/COLOR][COLOR=#007700]( [/COLOR][COLOR=#0000BB]$new_query [/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000BB]?>
<?php [/COLOR][COLOR=#007700]if ([/COLOR][COLOR=#0000BB]have_posts[/COLOR][COLOR=#007700]()) : while ([/COLOR][COLOR=#0000BB]have_posts[/COLOR][COLOR=#007700]()) : [/COLOR][COLOR=#0000BB]the_post[/COLOR][COLOR=#007700](); [/COLOR][COLOR=#0000BB]?>
[/COLOR]</div>
<div class="entry-[URL="http://forum.wordpress-deutschland.org/lexikon/?do=showentry&item=content"]content[/URL]">
[COLOR=#0000BB]<?php the_content[/COLOR][COLOR=#007700](); [/COLOR][COLOR=#0000BB]?>
[/COLOR]</div>
</div>
[COLOR=#0000BB]<?php [/COLOR][COLOR=#007700]endwhile; [/COLOR][COLOR=#0000BB]?>
<?php [/COLOR][COLOR=#007700]endif; [/COLOR][COLOR=#0000BB]?>
[/COLOR]...[/COLOR]
Alles anzeigen
Danke an den Autor: http://forum.wordpress-deutschland.org/mitglied/5870-putzlowitsch.html
Nun würde ich gerne die Dateien, die aus der Mediathek gelesen werden nach ihrer Beschreibung filtern. So zum Beispiel nach "Portraits", "Landschaft" im Falle eines Portfolios.
Bin leider ein ziemlicher Neuling. Hab schon versucht es mir durch googeln zusammenzureimen, aber habs nicht hinbekommen.
Danke und Grüße,
bassabus