Forums

[resolved] Gallery won't show up in my custom theme (6 posts)

  1. marc0047
    Member
    Posted 2 years ago #

    I'm able to get the built in Gallery function to work with the Default theme. However, I'm building my own theme, and the Gallery function is not showing any images in that theme. I'm having difficulty finding documentation on getting this to work properly. Anyone have any leads?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Are you using the_excerpt() when you should be using the_content()?

  3. marc0047
    Member
    Posted 2 years ago #

    I am using the_content(); in index.php.

    I should also add: none of the gallery markup is showing up. Only the paragraphs, images, etc. are showing up in each of the posts of my theme.

  4. marc0047
    Member
    Posted 2 years ago #

    Also, any leads in documentation on how to properly add the built-in Gallery function to your own theme would be great! I can't seem to find the right keywords to fins the right documentation.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You don't need to add anything to a theme to use the native Gallery.

  6. marc0047
    Member
    Posted 2 years ago #

    I found the problem: I'm using some of the Sandbox functions in my functions.php, and there is a function called sandbox_gallery($attr) which appears to be removing the markup for the built-in gallery.

    I removed it, and it is working now!

Topic Closed

This topic has been closed to new replies.

About this Topic