<?php // functions.php
// Funkcjonalnosci, ktora moga zostac dodane do kokpitu. 2 Sposoby
/*(1.)
add_theme_support($features, $post_type);
$featuers - wlasciwosc, ktora ma byc rejestrowana dla kokpitu
$post_type - ktore posty, lub jakie formaty postow maja byc zarejestrowane
*/
add_theme_support('post-thumbnails', array('post','recipes','restaurants','foodfight')); // obrazek
add_theme_support('post-formats', array('gallery')); // format postu - galeria
//aside, gallery, link, image, quote, status, video, audio, chat
/*(2.)
add_post_type_support( $post_type, $supports );
$post_type - rodzaj posta // post , page lub inny customowy
$supports - wlasciwowsci // title, editor, author, thumbnail, excerpt, trackbacks, custom-fields
*/
add_action( 'init', 'my_add_excerpts_to_pages' ); // rejestracja dla haka INIT
function my_add_excerpts_to_pages() {
add_post_type_support( 'page', 'excerpt' );
}
/*(3.) Dla Custom Post Type funkcjonalnosci mozemy rejestrowac dla atrybutu SUPPORTS
'supports' => array(
'title','editor','author','thumbnail','excerpt','comments','custom-fields'
)
*/
?>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.