- This topic has 5 replies, 2 voices, and was last updated 9 years, 6 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
I'm trying to figure out the easiest way for my client to display different ads on each page, using a Blissful child theme.
I thought about creating an above header widget area and using widget logic, but that isn't working. Here is the code:
My thought was to put the js in the header script area and the html in a text widget, but it didn't show up.
I've never seen ads like these, and the help on the advertisers end is minimal.
Thanks in advance!
I wrote about how to display different header images on different pages.
How many pages are you needing this for?
You can use PHP or custom fields.
This is the hook you could use rather than the genesis_header hook:
Fair bit of work but all tested and works.
As you can clearly see, if you want to use unique banners on every page, post etc, PHP code isn't the easiest solution.
The custom fields method enables you to create a custom meta box so you simply paste the js into the box for that specific page and it hooks into the genesis hook and executes in that position.
Thanks Brad. What she needs is different ads above her header, on up to 7 pages. Her actual header will remain the same on every page.
No problem. Simply change the hook to
in the code and the conditional tags if using the PHP method otherwise use the hook in a custom function with the custom field.
Or you could register the scripts and hook them in using
I think the custom field method is the best because they can then use it on more pages down the track
Yes, and that is what I want her to be able to do. I'm trying to work through the custom fields plugin, and I'm confused about how to place them above the header.
© 2023 WPEngine, Inc.