YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar thomas.p Support asked

[Tutorial] Add an offline image to YOOtheme Pro

If you are using the YOOtheme Pro template and want to add an offline image to your Joomla offline page, follow these steps.

Before

Image

After

Image

  • go to System->Global Configuration and click the Select button next to Offline Image to select an offline image from your media manager

Image

  • go to Extensions->Templates->Templates and click on Yootheme Details and Files OR access your site via FTP and navigate to /templates/yootheme/

Image

  • click on the file offline.php on the left to edit this file

Image

at line 29-35 you will see this statement checking for the offline message

        <?php if ($app->getCfg('display_offline_message', 1) == 1 && str_replace(' ', '', $app->getCfg('offline_message')) != '') : ?>

            <p><?= $app->getCfg('offline_message') ?></p>

        <?php elseif ($app->getCfg('display_offline_message', 1) == 2) : ?>

            <p><?= JText::_('JOFFLINE_MESSAGE') ?></p>

        <?php endif ?>  

directly after that add this statement

        <?php if (@getimagesize($app->getCfg('offline_image'))) : ?>

            <img src="<?= $app->getCfg('offline_image') ?>" alt="">  

        <?php endif ?>

Image

  • save & close the file

Please note: This change won't work with .svg files. It can be made update-safe by creating a Child Theme and placing the offline.php into the root folder of the Child Theme.

  • Tutorial
  • YOOtheme Pro

Edited

2 Answers

Know someone who can answer? Share a link to this question via email or twitter.