Adding a header to my blog and css issues

I am having 2 issues with my blog.

  1. I would like to add a header to this page https://www.smartcatrfid.com/luke-blog/ that looks like the header on https://www.smartcatrfid.com/blog/.
  2. I put custom css on my blog sidebar which shows up in the preview, but not on the live site. The sidebar on this page https://www.smartcatrfid.com/luke-blog/ should have a white background and 10px padding.
    Can you please help with this?

Hi There,

Can you please send us your website login details in a secure note so that we can have a look.

Thanks

Hi there,

Thanks for posting in.

  1. I checked and the two URL has the same header.

  2. Where did you add your custom CSS, I don’t see it anywhere even in admin.

Thanks!

I have my css added on the https://www.smartcatrfid.com/luke-blog/ page

Notice there is no header on the image id like it to have It say SmartCAT blog like the image. Or be able to add any header I want.

I meant “headline” not header. Sorry, I would like to be able to add a headline to the blog page. As well as have my CSS show up.

Hi again,

  • To show a headline on a blog page, add the following script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){
	$('<header class="x-header-landmark"><h1 class="entry-title">SmartCAT Blog</h1></header>').insertAfter('.blog .x-masthead');
});
  • It seems like a cache issue, make sure to delete the plugin’s cache and browser’s cache after making any CSS or JS change. Also disable optimization plugins while testing.

Hope this helps!

I tried this and am still not seeing the title on my posts page. Is there something else I can try?

Thank you!

Hi,

We can try another approach.

Kindly remove the js code provided above then add the code below in your child theme’s functions.php file

function add_my_title() {
    if(is_home()) {
      echo '<header class="x-header-landmark"><h1 class="entry-title">SmartCAT Blog</h1></header>';
    }
}
add_action( 'x_after_view_global__slider-below', 'add_my_title', 10 );

Add it after this line

// Additional Functions
// =============================================================================

Hope that helps.

The code helped me to show the Blog title.
But it appears aligned on the left side of the browser window.
I need it to be aligned to the content frame, that is about 200px away from the left side.
Thank you

Hi there,

Please change your code to this,

function add_my_title() {
    if(is_home()) {
      echo '<header class="x-header-landmark x-container max width offset"><h1 class="entry-title">SmartCAT Blog</h1></header>';
    }
}
add_action( 'x_after_view_global__slider-below', 'add_my_title', 10 );

It needs a container the same as the content.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.