Changing Slider Title for Posts Page

Hey!

Question 1: So I used the suggestions in this post to change the slider title for each page. Different title on header slider on different pages

The only page it’s not working for is the posts page, which has kept the slider title from the front page. I want to change the part that says “Breathe” to say “Blog” for that page.

My site URL is: https://neyen.io/blog

Question 2: where do I edit the CSS for individual posts on that page?

Thanks!

Hello there,

You would have to replace page’s body class name with your post’s.

  $('.page-id-890').slideTitle1('Main title goes here 1','Subtitle goes here 1');

If you want to have custom slide title on this post, use .postid-292 body class selector.

  $('.postid-292').slideTitle1('Main title goes here 1','Subtitle goes here 1');

Regards,
Kharis

Hi Kharis! I have replaced the page’s body class name with my post’s (as my Projects, Team, and Contacts page all work); it’s the blog page and all sub-pages that default to the main slider heading.

(function($){

  "use strict";

  $.fn.slideTitle1=function(t,i){this.length&&(this.find(".slide-item:nth-of-type(1) .maintitle").html(t),this.find(".slide-item:nth-of-type(1) .subtitle").html(i))},$.fn.slideTitle2=function(t,i){this.length&&(this.find(".slide-item:nth-of-type(2) .maintitle").html(t),this.find(".slide-item:nth-of-type(2) .subtitle").html(i))},$.fn.slideTitle3=function(t,i){this.length&&(this.find(".slide-item:nth-of-type(3) .maintitle").html(t),this.find(".slide-item:nth-of-type(3) .subtitle").html(i))},$.fn.slideTitle4=function(t,i){this.length&&(this.find(".slide-item:nth-of-type(4) .maintitle").html(t),this.find(".slide-item:nth-of-type(4) .subtitle").html(i))},$.fn.slideTitle5=function(t,i){this.length&&(this.find(".slide-item:nth-of-type(5) .maintitle").html(t),this.find(".slide-item:nth-of-type(5) .subtitle").html(i))};

  /* Slide title and subtitle in specific page */

  // our work
  $('.page-id-36').slideTitle1('Projects','neyen: breathing forth innovation');

  // our team 
  $('.page-id-30').slideTitle1('Our Team','neyen: breathing forth innovation');

  // blog, this doesn't work
  $('.page-id-282').slideTitle1('Blog','neyen: breathing forth innovation');
  
  // contact us
  $('.page-id-32').slideTitle1('Contact','neyen: breathing forth innovation');

  // Example post, doesn't work
  $('.page-id-292').slideTitle1('Blog','neyen: breathing forth innovation');

})(jQuery);