Created
October 30, 2017 16:41
-
-
Save ThomasLarge/931d6284906d36b2f19f01c1a5b08dfe to your computer and use it in GitHub Desktop.
WP snippets (HTML, inside theme)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php query_posts(array( | |
'post_type' => 'deals', | |
'posts_per_page' => 3 | |
) ); | |
?> | |
<?php while (have_posts()) : the_post(); ?> | |
<!-- Content here --> | |
<?php endwhile;?> | |
<?php wp_reset_query(); ?> // Always reset the loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo do_shortcode('SHORTCODE HERE'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php bloginfo('template_directory'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is where all of the snippets for Wordpress lives |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment