Guest User

Untitled

a guest
Jan 19th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <?php
  2. // Banner Title
  3. function saasland_banner_title() {
  4. $opt = get_option('saasland_opt');
  5. if(is_home()) {
  6. $blog_title = !empty($opt['blog_title']) ? $opt['blog_title'] : esc_html__('Blog', 'appland');
  7. echo esc_html($blog_title);
  8. }
  9. elseif(is_page() || is_single()) {
  10. the_title();
  11. }
  12. elseif(is_archive()) {
  13. the_archive_title();
  14. }
  15. elseif(is_category()) {
  16. single_cat_title();
  17. }
  18. elseif (class_exists('WooCommerce')) {
  19. if (is_shop()) {
  20. echo !empty($opt['shop_title']) ? esc_html($opt['shop_title']) : esc_html__('Shop', 'saasland');
  21. }
  22. }
  23. else {
  24. the_title();
  25. }
  26. }
  27.  
  28. function saasland_banner_subtitle() {
  29. if(is_home()) {
  30. $blog_subtitle = !empty($opt['blog_subtitle']) ? $opt['blog_subtitle'] : get_bloginfo('description');
  31. echo esc_html($blog_subtitle);
  32. }
  33. elseif(is_page() || is_single()) {
  34. echo nl2br(get_the_excerpt());
  35. }
  36. elseif (class_exists('WooCommerce')) {
  37. if (is_shop()) {
  38. echo !empty($opt['shop_subtitle']) ? esc_html($opt['shop_subtitle']) : '';
  39. }
  40. }
  41. }
Add Comment
Please, Sign In to add comment