Site logo

Archived topic

header element conditional page

5 replies · Started by Sebastien on May 1, 2019

Viewing posts 1–6 of 6

Hi,

I use a header element that display some content.
I would like the content differs depending of the active page (differ if Home or if Article or if blog or by name of the page) (without using "Display Rules" windows)

Can you help?

thanks

Hi there,

how will you be adding the different content to each of the different pages?

at the moment, the header element has content <h1>{{page_title}}</h1>
I would like use another header tag (h1 h2 ...) depending of the type of active page:

* if the active page is front end: <h1>{{page_title}}</h1>
* if the active page is blog: <h1>News</h1>
* if the active page is any Archive page: <span>News</span>
* if the active page's name is "testpage": <span>hahahhaahahah</span>

Personally i would just create the 4 separate header elements.
Otherwise you're into writing some PHP conditional logic script which won't be as easy to maintain or make changes to.

ok thanks !! :D

You're welcome

This archived topic is closed to new replies.