Separate template logic from template functions.php
-
As written in the WordPress Codex, template/design should be separated from program logic.
Actually there are template parts hardcoded in functions.php:
if ( ! function_exists( 'fruitful_entry_meta' ) ) { function fruitful_entry_meta() { ?> <span class="author-link author"><a href="<?php print esc_url( get_author_posts_url( get_the_author_meta( 'ID' ))); ?>"><?php print get_the_author(); ?></a></span>Typically this should be separated.
For example in an include file.Otherwise if somebody wants to remove the author link from any post, he has to remove this function…
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Separate template logic from template functions.php’ is closed to new replies.
