Hope some of you can help me with this as i'm really lost! This is hard to explain but here it goes. And i'm recently new to ACF (advanced custom fields), so please forgive me.
The setup:
1. I've created a new shortcode in my functions.php file (called [bier])
` function bierfunction() {
require_once trailingslashit( REDGOTGRILL_THEME_DIR ) . 'bier-page.php';
}
add_shortcode('bier','bierfunction');`
2. Then I created the php file "bier-page.php" as imported as above. And added some calls :
` <?php $bier_maand = new WP_Query(array(
'post_type' => 'bier_maand'
)); ?>`
` <div class="mprm-row">
<?php while($bier_maand->have_posts()) : $bier_maand->the_post();?> </div>`
` <div class="mprm-category-content">
<h2 class="mprm-title"><?php the_title(); ?></h2>
<p class="mprm-category-description">
<?php the_field('beschrijving_bier'); ?></p>
</div>`
3. I then hoped I could just use the shortcode in any page and it will insert my created php page! Well it works! Really nice even... Except for one thing!
Issue: The shortcode i've created is being displayed at the very top under my header. No matter what else i do!! Or whatever i place above it! It will continue to be displayed at the top of the page below the header.
LINK TO MY PAGE (ISSUE) : http://wapen.2-t.one/testing-issue/ (the beers shown is the shortcode)
Screenshot of the page set up in wordpress: http://prntscr.com/e96l1t
Conclusion: I'm about to trow myself out the window! What am i doing wrong?? Is this a CSS Styling issue? Because i have the feeling this has to do with the ACF call :
<?php $bier_maand = new WP_Query(array( 'post_type' => 'bier_maand' )); ?>
Any help will be greatly appreciated!