WordPress.org

Ready to get started?Download WordPress

Forums

Gallery to Slideshow
[resolved] move to above entry content (10 posts)

  1. offpeakdesign
    Member
    Posted 2 years ago #

    Hi, I see that it gets added to entry-content, but I'd like it to go before the entry-content class.

    The reason is that I want to edit the style of entry-content class by specifically changing the width, but keep the gallery the full size.

    What might I need to edit?

    Thanks for any responses!

    http://wordpress.org/extend/plugins/gallery-to-slideshow/

  2. Matt
    Member
    Plugin Author

    Posted 1 year ago #

    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!

  3. dylllaaannn
    Member
    Posted 1 year ago #

    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.

  4. offpeakdesign
    Member
    Posted 1 year ago #

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

  5. dylllaaannn
    Member
    Posted 1 year ago #

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

  6. offpeakdesign
    Member
    Posted 1 year ago #

    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.

  7. dylllaaannn
    Member
    Posted 1 year ago #

    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.

  8. offpeakdesign
    Member
    Posted 1 year ago #

    Makes perfect sense! Thanks!

  9. dylllaaannn
    Member
    Posted 1 year ago #

    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

  10. offpeakdesign
    Member
    Posted 1 year ago #

    Awesome. Glad I could contribute!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.