Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1.  
  2. if ( ! function_exists( 'kleo_title_main_content' ) ) {
  3. /**
  4. * Echo the title if it was set to show in main content area
  5. */
  6. function kleo_title_main_content() {
  7. if ( sq_option( 'title_location', 'breadcrumb' ) == 'main' && sq_option( 'title_status', 1 ) != 0 ) {
  8.  
  9. $title_status = true;
  10. if ( ( is_singular() || is_home() ) && get_cfield( 'title_checkbox' ) == 1 ) {
  11. $title_status = false;
  12. }
  13.  
  14. if ( $title_status ) {
  15. if ( ( is_singular() || is_home() ) && get_cfield( 'custom_title' ) && get_cfield( 'custom_title' ) != '' ) {
  16. $title = get_cfield( 'custom_title' );
  17. } else {
  18. $title = kleo_title();
  19. }
  20.  
  21. echo '<div class="container">';
  22. echo get_the_tag_list('<span class="custom-tag-list">', '', '</span>');
  23. echo '<h1 class="page-title">' . $title . '</h1>';
  24. echo '</div>';
  25. echo '<style>
  26.  
  27. span.custom-tag-list a {
  28. padding: 5px 10px;
  29. background: #eee;
  30. margin-right: 10px;
  31. color: #000;
  32. border-radius: 5px;
  33. border: 1px solid #ddd;
  34. font-size: 13px;
  35. }
  36. </style>';
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement