ashishsthanp

Zakra change archive content area page title

May 24th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function zakra_entry_title() {
  2.  
  3. if ( 'page-header' !== zakra_is_page_title_enabled() || is_front_page() ) {
  4.  
  5. if ( is_singular() ) :
  6. the_title( '<h1 class="entry-title tg-page-content__title">', '</h1>' );
  7. elseif ( is_archive() ) :
  8.  
  9. echo '<h1 class="page-title tg-page-content__title">';
  10. echo zakra_get_title();
  11. echo '</h1>';
  12. elseif ( is_404() ) :
  13. ?>
  14. <h1 class="page-title tg-page-content__title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'zakra' ); ?></h1>
  15. <?php
  16. else :
  17. the_title( '<h2 class="entry-title tg-page-content__title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
  18. endif;
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment