Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #978266
    helloari
    Participant

    Hey Guys,
    How can I display default page titles on all the pages? Is there any way from frontend or backend?
    How can I control there styles?

    Now some pages have titles, in some pages titles are added via cornerstone.. I want to make it uniform.

    #978456
    Lely
    Moderator

    Hello There,

    By default, you have total control for pages. You can add it on each page in anyway you like it. Unlike post, portfolio, archive pages where there’s format for page titles.

    Adding default page titles is not recommended because it is expected that each page is different, But if that will work on your situation that would be fine.

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add the following code on your child theme functions.php file:

    function add_page_title(){
      
      if ( is_page() ) {
      ?>
        <header class="x-header-landmark x-container max width">
        <h1 class="h-landmark"><span>CUSTOM PAGE TITLE</span></h1>
      </header> 
      <?php
      
      }
    
    }
    add_action('x_before_view_integrity__landmark-header', 'add_page_title');
    
    

    Replace CUSTOM PAGE TITLE with your default preferred title.

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-978266 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>