Change site-tagline for each project individually
-
Hello, I am trying to change the site-tagline, so that it shows the name of the project instead of a fixed tagline that stays the same no matter where I am on the site.
Is this possible?
I am trying to use this javascript that I’ve put in the Custome <head> content section of Custom CSS, but it doesn’t do anything.
<script>
jQuery(document).ready(function($) {
if($('body').hasClass('page-id-614')) {
$('.tagline').text('Mein erster Projekttitel');
}
else if($('body').hasClass('page-id-588')) {
$('.tagline').text('Mein zweiter Projekttitel');
}
});
</script>Is there a way to do that?
Thank you!
-
go to the documentation and go to custom javascript
you need to use the newpageshown event
-
@arminunruh Thank you very much, it works now! I also realized, I used page-id instead of post-id.
-
nice
what u could also do is put text in a row.
then right click the row, click "set html class and id" →
for html class add: "sticky" without ""then in your css:
.sticky{
position: sticky;
top: 0;
}
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it