Post format archives – WortGepresst



STARTSEITE MULTIMEDIA WORTGEPRESST FAMILIENBANDE BOOKMARK PRIVACY


Post format archives

… let’s say that you’re displaying links to the archive-views of your various custom-formatted posts (i.e., Post Formats). When visitors follow those links, the Post Format archives will be displayed via your theme’sarchive.phptemplate (orindex.php, depending on the theme). To customize each of the different Post Format archive-views, add the following snippet inarchive.php(or similar):

Some notes about this code:

  • It assumes the default WP Post Formats, edit to match your own.
  • It should be included in the Loop, afterif (have_posts())and beforewhile (have_posts()).
  • The code for the Date Archives can be removed if not needed.
  • Edit the markup and customize the PHP to suit your design.

Example

Here is an example of this technique implemented in thearchive.phpLoop:

As you can see, this snippet goes beyond Post Format archives and provides custom output for just about every type of WordPress archive. You’ve got your Post Formats, Dates, Tags, Categories, and the whole gang. By editing the markup to suit your needs, this Loop template facilitates granular control over your various archive-views.

Font Resize
Contrast
Zur Werkzeugleiste springen