{"id":2287,"date":"2012-08-03T15:51:46","date_gmt":"2012-08-03T15:51:46","guid":{"rendered":"http:\/\/gr-01.de\/whitepapers.grafik-und-redaktion.de\/?p=2287"},"modified":"2013-06-03T03:41:25","modified_gmt":"2013-06-03T01:41:25","slug":"post-formate-fuer-kalkofe-de","status":"publish","type":"post","link":"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=2287","title":{"rendered":"Post-Formate f\u00fcr kalkofe.de"},"content":{"rendered":"<p>Bon, en g\u00e9n\u00e9ral is s&#8217;agit de \u00e7a:<\/p>\n<ul class=\"square\">\n<li><a href=\"http:\/\/www.wpbeginner.com\/wp-themes\/what-whys-and-how-tos-of-post-formats-in-wordpress-3-1\/\" class=\"autohyperlink\" target=\"_blank\">www.wpbeginner.com\/wp-themes\/what-whys-and-how-tos&#8230;<\/a><\/li>\n<li><a href=\"http:\/\/lisasabin-wilson.com\/wordpress-3-1-post-formats-reference\/\" class=\"autohyperlink\" target=\"_blank\">lisasabin-wilson.com\/wordpress-3-1-post-formats-re&#8230;<\/a><\/li>\n<li><a href=\"http:\/\/de.wpseek.com\/has_post_format\/\" target=\"_blank\"># has_post_format ( $format, $post = null )<\/a><\/li>\n<\/ul>\n<p>On attribue des formats aux articles ce qui fait qu&#8217;ils affichen diff\u00e9remment \u00e0 la une ext aux pages d&#8217;archives comme aux pages uniques. On definit deux choses:<\/p>\n<ol>\n<li>l&#8217;affichage de l&#8217;article \u00e0 la une du site ou dans les archives et les r\u00e9sultats de recherche et<\/li>\n<li>l&#8217;affichage dans la page unique, l\u00e0 ou qu&#8217;un seul article est affiche enti\u00e8rement.<\/li>\n<\/ol>\n<p>J&#8217;ai besion de cette fonctionnalit\u00e9, car par exemple parfois je veux cr\u00e9er un teaser qui affiche qu&#8217;une image et \u00e0 la une ni titre ni texte et sur la page unique l&#8217;image sans titra mais avec texte opionnel\u00a0 (format &#8222;image&#8220;). Dans un site WordPress &#8222;normal&#8220; on cr\u00e9e un fichier par format ou on d\u00e9crit tout mais comme Thematic fait tout dans ses inclus, son content-extensions.php etc., l\u00e0 ce n&#8217;est pas la m\u00eame chose.<\/p>\n<p>Bon je commen\u00e7ais ma recherche. De quoi s&#8217;agit-il&#8230;<\/p>\n<table id=\"funcinfos\">\n<tbody>\n<tr>\n<td>Parameter:<\/td>\n<td>\n<ul>\n<li>(string) $format The format to check for<\/li>\n<li>(object|id) $post The post to check. If not supplied, defaults to the current post if used in the loop.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>Nutzt:<\/td>\n<td>\n<ul>\n<li><a href=\"http:\/\/wpseek.com\/has_term\/\">has_term<\/a>()<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>Gibt zur\u00fcck:<\/td>\n<td>\n<ul>\n<li>(bool) True if the post has the format, false otherwise.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>Definiert in:<\/td>\n<td>\n<ul>\n<li><a href=\"http:\/\/de.wpseek.com\/has_post_format\/#source\">wp-includes\/post.php<\/a>, line 536<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td>\u00c4hnliche Funktionen:<\/td>\n<td>\n<ul>\n<li><a href=\"http:\/\/de.wpseek.com\/set_post_format\/\">set_post_format<\/a>, <a href=\"http:\/\/de.wpseek.com\/get_post_format\/\">get_post_format<\/a>, <a href=\"http:\/\/de.wpseek.com\/_post_format_link\/\">_post_format_link<\/a>, <a href=\"http:\/\/de.wpseek.com\/get_post_format_link\/\">get_post_format_link<\/a>, <a href=\"http:\/\/de.wpseek.com\/_post_format_request\/\">_post_format_request<\/a><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Le probl\u00e8me: comment int\u00e9grer \u00e7a dans le mod\u00e8le qui est bas\u00e9 sur Thematic Framework.<\/p>\n<p>Une &#8222;Notlaura&#8220; avait rencontr\u00e9 de m\u00eame d\u00e9fi et elle \u00e9crit <a href=\"http:\/\/themeshaper.com\/forums\/topic\/how-to-add-post-format-classes-to-thematics-body-classes#post-20728\" target=\"_blank\">ici<\/a> en quoi il consiste pour conclure:<\/p>\n<blockquote><p>I had a very hard time getting post formats to function in my child theme. Finally got them working thanks to <a href=\"http:\/\/wordpress.stackexchange.com\/questions\/12420\/post-format-selector-in-thematic-child-theme-post-class\/15067#15067\">my post on WPAnswers<\/a> &#8211; I hope this helps anyone who is having the same\/similar issues!<\/p><\/blockquote>\n<p>J&#8217;ai adapt\u00e9 <a href=\"http:\/\/wordpress.stackexchange.com\/questions\/12420\/post-format-selector-in-thematic-child-theme-post-class\/15067#15067\" target=\"_blank\">le Code qu&#8217;elle poste dans WPAnswers<\/a> dans ma functions.php.<\/p>\n<p>L\u00e0 la &#8222;Notlaura&#8220; (qui en fait est une Lara) construit sur le code obtenu:<\/p>\n<p><a href=\"http:\/\/notlaura.com\/studioblog\/omg-post-formats\/\" class=\"autohyperlink\" target=\"_blank\">notlaura.com\/studioblog\/omg-post-formats\/<\/a><\/p>\n<p>J&#8217;ai adapt\u00e9 \u00e7a dans ma functions.php et \u00e7a ne marche pas. D\u00e9j\u00e0 le format &#8222;standard&#8220; n&#8217;affichait rien du tout sauf si je n&#8217;\u00e9crivais pas<\/p>\n<pre>if ( has_post_format( &#039;standard&#039; ))<\/pre>\n<p>mais par<\/p>\n<pre>if ( &#039;&#039; == $format )<\/pre>\n<p>Au pire: les autres formats r\u00e9agissent juste pas du tout.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bon, en g\u00e9n\u00e9ral is s&#8217;agit de \u00e7a: <a href=\"http:\/\/www.wpbeginner.com\/wp-themes\/what-whys-and-how-tos&#8230;\" class=\"autohyperlink\" target=\"_blank\">www.wpbeginner.com\/wp-themes\/what-whys-and-how-tos&#8230;<\/a> <a href=\"http:\/\/lisasabin-wilson.com\/wordpress-3-1-post-formats-re&#8230;\" class=\"autohyperlink\" target=\"_blank\">lisasabin-wilson.com\/wordpress-3-1-post-formats-re&#8230;<\/a> # has_post_format ( $format, $post = null ) On attribue des formats aux articles ce qui fait qu&#8217;ils affichen diff\u00e9remment \u00e0 la une ext aux pages d&#8217;archives comme aux pages uniques. &hellip; <a href=\"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=2287\">Weiterlesen &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/2287"}],"collection":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2287"}],"version-history":[{"count":5,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/2287\/revisions"}],"predecessor-version":[{"id":2949,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/2287\/revisions\/2949"}],"wp:attachment":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}