Gallery Shortcode custom placement
-
Hi Guys,
I am in the process of producing a custom theme for a client.
The theme’s homepage will have a Jetpack tiled Gallery displaying full width across the page…BEFORE THE CONTENT.
The client wants to be able to edit the content of the gallery when the see fit.
I thought that the process of placing the gallery shortcode in my template would work via echo do shortcode. But what I need to do is take it out of the_content(); and display just before the content begins.
How can I achieve this???
Here is the code for this particular part including the html so you awesome wordpress dudes can help me out.
<section class="row main-content-home" role="main"> <?php if (have_posts()): while (have_posts()) : the_post(); ?> <div class="gallery-display"> I WANT TO PLACE THE GALLERY HERE, BUT I CAN'T JUST PUT IN THE ID'S BECAUSE THEY MIGHT CHANGE. I NEED A DYNAMIC APPROACH. </div> <div class="container"> <h1><?php the_title(); ?></h1> <?php the_content(); ?> //REST OF THE LOOP </div> </section>
If somebody could help me it would be great.
Dan
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Gallery Shortcode custom placement’ is closed to new replies.