Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Hinzufügen einer Benutzeroberfläche für Beitragsformate in WordPress 3.5

Hinweis der Redaktion: Wir erhalten eine Provision für Partnerlinks auf WPBeginner. Die Provisionen haben keinen Einfluss auf die Meinung oder Bewertung unserer Redakteure. Erfahre mehr über Redaktioneller Prozess.

Beitragsformate wurden in WordPress 3.1 eingeführt, um Mikroblogging-Funktionen in WordPress anzubieten. Obwohl diese Funktion vorhanden ist, wissen die meisten Anfänger nicht, wie sie sie nutzen können. Der Grund: Weil es nicht so prominent ist wie bei Tumblr. WordPress hat eine Benutzeroberfläche, um einen Beitrag in verschiedenen Formaten zu veröffentlichen, aber die kleine Radio-Button-Meta-Box ist verbesserungswürdig. Alex King, ein bekannter WordPress-Entwickler und Plugin-Autor, hat zusammen mit seinem Team bei CrowdFavorite daran gearbeitet, eine Lösung für dieses Problem zu finden. Er hat eine Benutzeroberfläche für Beitragsformate entwickelt, um sie in seine eigenen Projekte einzubinden, und war so freundlich, diesen Code für die Community freizugeben. In diesem Artikel zeigen wir Ihnen, wie Sie mit dem Post Formats UI-Tool eine Benutzeroberfläche für Beitragsformate in WordPress 3.5 hinzufügen können.

Was sind Beitragsformate?

Beitragsformate bieten eine Methode, einen bestimmten Beitrag anders zu gestalten. Mit dieser Funktion können Sie das Anzeige-„Format“ eines bestimmten Beitrags festlegen. Diese Funktion erweitert den Mikro-Blogging-Aspekt von WordPress, indem Formate wie Videos, Links, Bilder, Audios, Zitate, Status usw. hinzugefügt werden (ähnlich wie bei Tumblr).

Die Beitragsformate hängen von Ihrem Theme ab, so dass Sie diese in Ihrem WordPress-Dashboard sehen können oder auch nicht. Die Standard-Benutzeroberfläche von WordPress zur Auswahl eines Beitragsformats beim Schreiben eines Beitrags sieht wie folgt aus:

Post Formats Radio Button User Interface

Installation der Beitragsformate UI

Gehen Sie zum Post Formats UI-Projekt auf GitHub. Klicken Sie auf die Schaltfläche zip, um die Dateien im Repository herunterzuladen.

Download Post Formats UI plugin from GitHub

Gehen Sie zu Plugins “ Neu hinzufügen “ Hochladen im WordPress-Adminbereich. Klicken Sie auf die Schaltfläche Datei auswählen und wählen Sie die heruntergeladene Zip-Datei aus. Klicken Sie auf die Schaltfläche Jetzt installieren. Sobald das Plugin erfolgreich hochgeladen wurde, klicken Sie auf den Link Plugin aktivieren.

Wie Post Formats UI funktioniert

Sobald das Plugin aktiviert ist, ändert es den Bearbeitungsbereich für Beiträge, indem es die verfügbaren Beitragsformate als Registerkarten oben hinzufügt. Jetzt können Sie zwischen dem Schreiben eines Beitrags, einem Zitat, einer Seite oder einer Galerie wechseln. Wenn Sie auf die Registerkarte für ein anderes Beitragsformat klicken, wird der Rest des Bearbeitungsbereichs für dieses bestimmte Beitragsformat angepasst. Wenn Sie z. B. auf Status klicken, wird das Feld für den Beitragstitel ausgeblendet, und wenn Sie auf Galerie klicken, wird oben eine Schaltfläche zum Hochladen von Bildern angezeigt.

User Interface for Post Format Quote

User Interface for Post Format Link

Wir sind der Meinung, dass Beitragsformate in der Regel von Anfängern ignoriert werden, weil sie nicht sichtbar sind. Ein Feld mit einer Optionsschaltfläche ermutigt sie nicht wirklich, Beitragsformate zu verwenden. Das Hinzufügen einer schönen Benutzeroberfläche wird die Benutzer dazu ermutigen, eine bessere Unterstützung von Beitragsformaten in ihren Themes zu fordern. Entwickler werden sich auch eher geneigt und motiviert fühlen, Themes zu erstellen, die eine Vielzahl von Formaten unterstützen. Aus diesem Grund plant das Kernteam, diese Funktion in WordPress 3.6 aufzunehmen. Halten Sie das Hinzufügen der Benutzerschnittstelle für Postformate für eine gute Idee? Lassen Sie es uns in den Kommentaren unten wissen.

Offenlegung: Unsere Inhalte werden von unseren Lesern unterstützt. Das bedeutet, dass wir möglicherweise eine Provision verdienen, wenn Sie auf einige unserer Links klicken. Mehr dazu erfahren Sie unter Wie WPBeginner finanziert wird , warum das wichtig ist und wie Sie uns unterstützen können. Hier finden Sie unseren redaktionellen Prozess .

Das ultimative WordPress Toolkit

Erhalte KOSTENLOSEN Zugang zu unserem Toolkit - eine Sammlung von WordPress-bezogenen Produkten und Ressourcen, die jeder Profi haben sollte!

Reader Interactions

10 KommentareEine Antwort hinterlassen

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jonas Lundman says

    We been using post formats since it arrived. A post with only a single link and some text doesnt need a excerpt when view the category. But other posts in the same category needs the excerpt at not to show the whole content. We Dont need to create a new post-type for layout reason.

    At the same point, a neebe would think a post-template (like page-tamplate) would be a obvious context for this function UI.

    – And we agree.

  3. Elliott richmond says

    I’m hoping that the next upgrade will have better support for post formats without having to use a plugin but, this plugin does look very useful for a better UX!

  4. Dwaynne Villiers says

    As cool as this is, can we see real worl applications? Or at least some sample scripts to point us into how this seemingly powerful feature can be deployed? For example, if I have a post, and all it is is a link or a video, how can I style it accordingly? How can I have an archive/category page with different styles applied to each post format? Example, if post format=video then use style x else if post format = link then use style y.

    Looking forward to more hidden gems form the WP Beginner team. Thanks!

  5. Louis says

    I have been working with WordPress for a couple years and didn’t even realize what those formats were about. I’ve been too busy playing with plugins that made sense to me.

    Having said that, now that you have cleared some of the haze about these fomats, I can stop looking for other plugins that do what this one does.. lol

    I think it would be a good idea to make those formats more obvious for people. That might help others avoid having to figure out how to make custom post types when these types of formats are already there.

    WordPress can be quite difficult to fully understand sometimes. There isn’t really a manual of any substance offered by WP Dev.’s (aside from the website pages that sometimes can’t even be found for lack of knowing exactly what to search for), so helpful tips like those you offer on this site are quite valuable, thanks for this and the many other enlightening topics and explanations you have included here.

  6. Bernie says

    Thanks for the article on post formats. I have heard the term but not really been sure what its all about. I am using one of the default WP themes 2011 and I can see the format radio buttons as you describe. However I can t for the life of me see what difference this makes.

    I did investigate the plugin mentioned but it hasn’t been updated in over 400 days and not rated compatible with WP 3.5. I would like to see the effect this formatting has on a post.

    • Louis says

      Hi Bernie,

      If you followed the link provided, the github project was updated 2 months ago for compatibility with WP 3.5.

  7. Donna says

    I think it’s a great idea. I’m pretty wp-savvy, and I even forget they exist most of the time. That would be a welcome change.

    Know what I would welcome even more? Page and post-specific widgets. There are plugins to handle this, but I haven’t found any that aren’t kinda kludgy or that don’t get to be way to difficult with a site with lots of pages.

Eine Antwort hinterlassen

Danke, dass du einen Kommentar hinterlassen möchtest. Bitte beachte, dass alle Kommentare nach unseren kommentarpolitik moderiert werden und deine E-Mail-Adresse NICHT veröffentlicht wird. Bitte verwende KEINE Schlüsselwörter im Namensfeld. Lass uns ein persönliches und sinnvolles Gespräch führen.