Adjust footer action items to not get post content
authorLaury GvR <laury@gaslightmedia.com>
Thu, 10 Oct 2019 17:05:47 +0000 (13:05 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 10 Oct 2019 17:05:47 +0000 (13:05 -0400)
Blog code was using a filter causing the post content to appear in
the block content areas, instead of the block content. This has
been replaced with the $block->post_content line to avoid this
issue.

parts/footer-action-items.php

index 3ab6b40..942da87 100644 (file)
                 <div class="action-content text-center">
                     <h2><?php echo $block->post_title;?></h2>
                     <div class="action-item-content">
-                        <?php echo apply_filters('the_content', $block->post_content) . $block->post_excerpt;?>
-                </div>
-                <?php if($block->url) { ?>
-                    <a class="action-button" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
-                        <?php if ($block->post_name == 'enews-signup') { ?>
-                            Signup
-                        <?php } else if ( $block->post_name == "free-travel-guide" ) { ?>
-                            View Them All
-                        <?php } ?>
-                    </a>
-                <?php } ?>
+                        <?php echo wpautop($block->post_content);?>
+                    </div>
+                    <?php if($block->url) { ?>
+                        <a class="action-button" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
+                            <?php if ($block->post_name == 'enews-signup') { ?>
+                                Signup
+                            <?php } else if ( $block->post_name == "free-travel-guide" ) { ?>
+                                View Them All
+                            <?php } ?>
+                        </a>
+                    <?php } ?>
                 </div>
             </div>
             <?php $count++; ?>