{"id":3429,"date":"2016-11-19T05:25:20","date_gmt":"2016-11-19T05:25:20","guid":{"rendered":"http:\/\/musilda.cz\/?p=3429"},"modified":"2016-11-19T05:25:20","modified_gmt":"2016-11-19T05:25:20","slug":"pridani-css-tridy-prvni-prispevek-vypisu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/pridani-css-tridy-prvni-prispevek-vypisu\/","title":{"rendered":"P\u0159id\u00e1n\u00ed css t\u0159\u00eddy pro prvn\u00ed p\u0159\u00edsp\u011bvek v\u00fdpisu"},"content":{"rendered":"

Tento snippet v\u00e1m jednodu\u0161e p\u0159id\u00e1 do v\u00fdpisu \u010dl\u00e1nk\u016f, css t\u0159\u00eddu u prvn\u00edho p\u0159\u00edsp\u011bvku. Samoz\u0159ejm\u011b, \u017ee funkci m\u016f\u017eete upravit tak, aby v\u00e1m pomoc\u00ed n\u011bjak\u00e9 podm\u00ednky, nebo iterace vkl\u00e1dala t\u0159\u00edd i na jin\u00e1 m\u00edsta.<\/p>\n

K\u00f3d funkce:<\/p>\n

add_filter( 'post_class', 'first_post_class' );\nfunction first_post_class( $classes ) {\n     global $wp_query;\n     if( 0 == $wp_query->current_post ){\n         $classes[] = 'first';\n     }\n     return $classes;\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"

Tento snippet v\u00e1m jednodu\u0161e p\u0159id\u00e1 do v\u00fdpisu \u010dl\u00e1nk\u016f, css t\u0159\u00eddu u prvn\u00edho p\u0159\u00edsp\u011bvku. Samoz\u0159ejm\u011b, \u017ee funkci m\u016f\u017eete upravit tak, aby v\u00e1m pomoc\u00ed n\u011bjak\u00e9 podm\u00ednky, nebo iterace vkl\u00e1dala t\u0159\u00edd i na jin\u00e1 m\u00edsta. K\u00f3d funkce: add_filter( ‚post_class‘, ‚first_post_class‘ ); function first_post_class( $classes ) { global $wp_query; if( 0 == $wp_query->current_post ){ $classes[] = ‚first‘; } return<\/p>\n","protected":false},"author":1,"featured_media":2635,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,19],"tags":[],"class_list":["post-3429","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sablony","category-snippety"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/3429"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=3429"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/3429\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/2635"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=3429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=3429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=3429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}