Custom Row not Appearing on Live Site
Permalink
OK, so I am using the elemental theme for a simple cigar shop site I built. I modified the header grid and the footer grid with no problem and everything shows up fine. I created a custom row where I have 4 columns for logos in the space where footerSiteTitle and footerSocial were and that is where I am stuck. I am pretty sure I need to change something at the top of this code but I am not sure what to do. Here is the code I have now:
When I am in edit mode I can add content (images) and they appear just fine. When I exit edit mode the entire row is invisible and I can't figure out why. I have attached a screenshot in edit mode. Any help or guidance is greatly appreciated.
Here is a link to the site:
http://villagecigar.com/
<?php defined('C5_EXECUTE') or die("Access Denied."); $footerSiteTitle = new GlobalArea('Footer Site Title'); $footerSocial = new GlobalArea('Footer Social'); $footerSiteTitleBlocks = $footerSiteTitle->getTotalBlocksInArea(); $footerSocialBlocks = $footerSocial->getTotalBlocksInArea(); $displayFirstSection = $footerSiteTitleBlocks > 0 || $footerSocialBlocks > 0 || $c->isEditMode(); ?> <footer id="footer-theme"> <?php if ($displayFirstSection) { ?> <section> <div class="container"> <div class="row"> <div class="col-sm-3"> <?php $a = new GlobalArea('Footer Logo 1');
Viewing 15 lines of 39 lines. View entire code block.
When I am in edit mode I can add content (images) and they appear just fine. When I exit edit mode the entire row is invisible and I can't figure out why. I have attached a screenshot in edit mode. Any help or guidance is greatly appreciated.
Here is a link to the site:
http://villagecigar.com/
Your row of images is being conditionally displayed.
This determines the true/false value of $displayFirstSection.
$displayFirstSection is true if there is at least one block in the "Footer Site Title" area
$displayFirstSection is true if there is at least one block in the "Footer Social" area
$displayFirstSection is true if the page is in Edit Mode
Since there are no blocks in either area, once you leave Edit Mode, your row of images is not displayed.
Remove the code that sets a value for $displayFirstSection
Remove the opening and closing if lines