Plugin shortcodes dont work
-
I am in the process of creating a new site and havent used any plugins to date but needed a grid gallery one and this is where I found my issue. I have put the shortcode on the page, and thought I had a conflict but it seems its my php and with that the php from wordpress and how I have used it, I think anyway.
I have created a new template and this template is used on every page, and the code is below, and so I believe the shortcodes dont work because of the php that allows the content of each page to display on the page.
<?php /* Template Name: MonnowTemplate */ ?> <?php $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' ); get_header(); ?> <button class="hamburger hamburger--arrow is-active" type="button" id="menu-toggle-mobile"> <span class="hamburger-box"> <span class="hamburger-inner"></span> </span> </button> <div id="overlay" onclick="off()"> <img id="overlayImage" src="https://www.accend4web.co.uk/Monnow/wp-content/themes/twentytwenty-child/images/M-Logo.png" /> </div> <div class="d-flex toggled header-wrap" id="wrapper" style="background: url('<?php echo $backgroundImg[0]; ?>') no-repeat; "> <!-- Sidebar --> <div class="bg-light border-right" id="sidebar-wrapper"> <div class="sidebar-heading" style="text-align:center"></div> <br/> <nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom" style="position:relative; float:right;"> <button class="hamburger hamburger--arrow" type="button" id="menu-toggle"> <span class="hamburger-box"> <span class="hamburger-inner"></span> </span> </button> </nav> <div id="navItemsSidebar"> <div class="list-group list-group-flush hiddenAway" id="monnow-menu"> <?php if ( has_nav_menu( 'primary' ) ) { wp_nav_menu( array( 'container' => '', 'items_wrap' => '%3$s', 'theme_location' => 'primary', ) ); } ?> </div> </div> </div> <!-- /#sidebar-wrapper --> <!-- Page Content --> <div id="page-content-wrapper"> <div class="container-fluid"> <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); get_template_part( 'template-parts/content', get_post_type() ); } } ?> <?php get_template_part( 'template-parts/pagination' ); ?> </div> </div> <!-- /#page-content-wrapper --> </div>
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Plugin shortcodes dont work’ is closed to new replies.