Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:52:14+00:00 2026-06-02T19:52:14+00:00

I have read through many posts and articles about styling a WordPress Gallery, but

  • 0

I have read through many posts and articles about styling a WordPress Gallery, but I would like to change the structure. Below is an example of a normal gallery code. I want to remove the <dl> <dt> <br> and replace them with my own elements. Any idea where I can do this in the WordPress file structure?

<div id="gallery-1" class="gallery galleryid-1 gallery-columns-1 gallery-size-thumbnail">
<dl class="gallery-item">
<dt class="gallery-icon">
    <a href="http://mydomain.com/2012/01/hello-world/dsc_0003/" title="DSC_0003"><img width="376" height="250" src="http://mydomain.com/wp-content/uploads/2012/01/DSC_0003-376x250.jpg" class="attachment-thumbnail" alt="DSC_0003" title="DSC_0003"></a>
</dt>
</dl>
<br style="clear: both">
<dl class="gallery-item">
<dt class="gallery-icon">
    <a href="http://mydomain.com/2012/01/hello-world/dsc_0003/" title="DSC_0003"><img width="376" height="250" src="http://mydomain.com/wp-content/uploads/2012/01/DSC_0003-376x250.jpg" class="attachment-thumbnail" alt="DSC_0003" title="DSC_0003"></a>
</dt>
</dl>
<br style="clear: both">
</div>

Any help would be greatly appreciated. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:52:15+00:00Added an answer on June 2, 2026 at 7:52 pm

    If one did want to further customize the default post gallery you can add a filter to post_gallery to produce your own output. if the post_gallery filter returns anything, the default gallery output will be ignored. as a starting point, look at the gallery shortcode function, which is located in /wp-includes/media.php. it uses get_posts to fetch attachments and output them. you could copy that function entirely into your functions.php file and change the name and use that as your filter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read through the various posts on SO about this, but have still not
I have gone through many articles but I am still not clear about the
I have read through some tutorials about javascript prototypal inheritance patterns but I am
I have read many posts about how to specify the foreign key name in
I have read through the solutions to similar problems, but they all seem to
Okay guys, I have read through all the other posts and question on jQuery
Despite many posts I have looked through being of along the same lines as
I have read many other posts on here that state the same issue and
I've read several of the posts on stack overflow already about this topic, but
Note to Mod: I read through about a dozen posts that seemed to pertain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.