Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Matt

    (@sksmatt)

    Hi offpeakdesign,

    The gallery is created on the content output, I think what you want to do is not possible. Would suggest to try to approach it other way.

    Kind Regards!

    offpeakdesign,

    Not sure if this is a proper way, but I found one way. If you edit the loop.php file and add this shortcode: <?php echo do_shortcode(“[gallery]“); ?> right above the entry-title div, it’ll post the gallery above the title. It’s not in the entry-content, but it’s still in the post. It’ll show two slideshows, one in the entry-content and one above the title. I used CSS to hide the one within the entry-content with the display: none; property.

    Thread Starter offpeakdesign

    (@offpeakdesign)

    Good idea, thanks, dylllaaannn. That seems like a good and simple work around!

    I just realized that you lose the keyboard navigation feature with this.

    Thread Starter offpeakdesign

    (@offpeakdesign)

    Thanks, good to know, dylllaaannn. What I ended up doing before I saw your suggestion was made edits in my css to make the gallery position absolute at the top. Then added a top margin the height size of the gallery to my content div, so that it goes below the gallery.

    For example:

    If my gallery is 600px in height…

    .photospace {position:absolute !important; top:0;}

    .post-format-gallery .entry-content{margin-top:600px}

    So far I’m not experiencing any issues with this solution. Note that this will need to be further tweaked if you wanted to have some posts have a gallery and some posts not to have a gallery (Otherwise, you’d end up with a big blank space above the main content where you didn’t have a gallery). Probably would use or create a separate post template for slideshow galleries only.

    That sounds good too. You could probably add a category to each type to make specific css changes to ones with a gallery and ones without. In that case you could could make the css body.gallery and body.no-gallery properties, and give the position: absolute; to the ones under the body.gallery posts.

    This way, you just check the category and it’ll automatically apply the appropriate css.

    Thread Starter offpeakdesign

    (@offpeakdesign)

    Makes perfect sense! Thanks!

    Thank you! I ended up switching my coding to the way you did it. It let me keep the keyboard control, and I just set different margins depending on whether I make it a standard post or gallery post

    Thread Starter offpeakdesign

    (@offpeakdesign)

    Awesome. Glad I could contribute!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Gallery to Slideshow] move to above entry content’ is closed to new replies.