• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Banner Code in Header

dotch

Chevereto Member
I would like to place pop-up code into the header (if possible before the </head> tag and only in viewer pages).

Right now there only seems to be a field for "Inside viewer foot (image page)".
 
app/themes/Peafowl/custom_hooks

Check the readme file and add your code in a file called header.php
 
I renamed the header.sample.php into header.php and added the code like this:

Code:
<?php
if(!defined('access') or !access) die('This file cannot be directly accessed.');
/* Add here your custom header code */
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->
?>

But my Chevereto site becomes completely white. Do I do something wrong?

Thanks for any help.
 
PHP:
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
/* Add here your custom header code */
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->
 
Sure works. But it's just below the </head> tag and not in between the <head></head> tags.

To be more precise the code btw is:

PHP:
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->

So I removed

Code:
/* Add here your custom header code */

Otherwise it is shown.
 
Last edited:
...

That is code inside a PHP tag so is PHP code, not HTML code. HTML code must be placed outside PHP tags.
 
Back
Top