Problem: U WordPress-u kada se edituje stranica ne vide se isti izgled kao na sajtu?
Rešenje:
- U folderu za aktuelnu temu imamo fajl style.css njega kopiramo u fajl editor-style.css
- U fajlu functions.php pronađi:
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH.'/legacy.comments.php';
endif;
return $file;
} - Na red ispod dodajem:
add_filter('mce_css', 'my_editor_style');
function my_editor_style($url) {if ( !empty($url) )
$url .= ‘,’;// Change the path here if using sub-directory
$url .= trailingslashit( get_stylesheet_directory_uri() ) . ‘editor-style.css’;return $url;
} - Otovorimo editor. Po potrebi u editor-style.css možemo skloniti stilove koji smetaju (npr. ja sam sklonio mračnu pozadinu).

Blog
This article was written by: pera
1 komentar
He,a sto to lepo sve ne bi spakovao u plugin, i umesto da kopiras rucno fajlove, jednostavno nasao css fajl aktuelne teme i iz njega izvukao stilove koji su zatvoreni u neke tokene, npr. /* EDITOR_STYLES */.
Na menjanje teme to uradis ponovo. Na taj nacin sve sto treba da uradis je da odredjene stilove stavis unutar tokena u samom css-u teme.
Lakse, radi sa svim temema, ili bar skoro svim temama,mozes da ga premestas sa sajta na sajt, i manje posla, a verujem da bi bio i isti broj PHP linija.