Tagged: x
-
AuthorPosts
-
October 28, 2016 at 4:16 pm #1235270
Chris StovallParticipantI would like to add “the grid” above the header in the icon theme. I have the child theme icon/views/wp-header ready to go but I can’t find the PHP to add.
Thanks!
CDSOctober 29, 2016 at 12:45 am #1235620
RadModeratorHi there,
Thanks for writing in.
You can add it like this to your custom wp-header.php
<?php echo do_shortcode('[your_the_grid_shortcode_here]'); ?>Then replace [your_the_grid_shortcode_here] with your shortcode that can be found at your the grid’s admin page.
Thanks!
October 30, 2016 at 8:55 pm #1237226
Chris StovallParticipantThis worked great.
One last thing, what would I do if I wanted it only on certain pages. Or maybe just the home page?
Thanks!!
CDSOctober 30, 2016 at 11:37 pm #1237362
Rue NelModeratorHello There,
If you want to display it on certain pages only, you can add a condition in the code like this:
<?php if ( is_home() ) { echo do_shortcode('[your_the_grid_shortcode_here]'); } elseif ( is_page('123') ) { echo do_shortcode('[your_the_grid_shortcode_here]'); } ?>To know more about these conditional tags, please check out the codex: https://developer.wordpress.org/themes/basics/conditional-tags/
To get the page ID, you can check it here: https://community.theme.co/kb/how-to-locate-post-ids/
Hope this helps.
November 3, 2016 at 6:41 pm #1243039
Chris StovallParticipantCan we just say that the homepage is page 6 and only show it on that page or do we need to have all of the other page numbers present?
November 3, 2016 at 11:32 pm #1243354
RadModeratorHi there,
There is no need, you can reduce it to this if you’re only targeting the home page.
<?php if ( is_home() ) { echo do_shortcode('[your_the_grid_shortcode_here]'); } ?>Thanks!
November 5, 2016 at 12:31 pm #1245160
Chris StovallParticipantPerfect!!
November 5, 2016 at 12:56 pm #1245178
ThaiModeratorIf you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1235270 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
