WordPress.org

Ready to get started?Download WordPress

Forums

How to remove img tag from gallery (5 posts)

  1. juodikis
    Member
    Posted 1 year ago #

    Hi,

    I am using custom function for my gallery but still I need some mods.

    I have this:

    <div class="gallery galleryid-182" id="gallery-1">
    	<a title="Image title #1" href="http://image-link.com/1.jpg" rel="shadowbox[title]"><img title="Image title #1" alt="Image title #1" class="attachment-thumbnail" src="http://image-link.com/1.jpg"></a>
    	<a title="Image title #2" href="http://image-link.com/2.jpg" rel="shadowbox[title]"><img title="Image title #2" alt="Image title #2" class="attachment-thumbnail" src="http://image-link.com/2.jpg"></a>
    	<a title="Image title #3" href="http://image-link.com/3.jpg" rel="shadowbox[title]"><img title="Image title #3" alt="Image title #3" class="attachment-thumbnail" src="http://image-link.com/3.jpg"></a>
    	<a title="Image title #3" href="http://image-link.com/4.jpg" rel="shadowbox[title]"><img title="Image title #4" alt="Image title #4" class="attachment-thumbnail" src="http://image-link.com/4.jpg"></a>
    </div>

    And I want to be like this:

    <div class="gallery galleryid-182" id="gallery-1">
    	<a title="Image title #1" href="http://image-link.com/1.jpg" rel="shadowbox[title]"></a>
    	<a title="Image title #2" href="http://image-link.com/2.jpg" rel="shadowbox[title]"></a>
    	<a title="Image title #3" href="http://image-link.com/3.jpg" rel="shadowbox[title]"></a>
    	<a title="Image title #3" href="http://image-link.com/4.jpg" rel="shadowbox[title]"></a>
    </div>

    Someone help me! :)

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    I am using custom function for my gallery

    start by posting this function -
    pleae use the http://pastebin.com/ - see http://codex.wordpress.org/Forum_Welcome#Posting_Code

  3. juodikis
    Member
    Posted 1 year ago #

    My functions.php you can see here

  4. bcworkz
    Member
    Posted 1 year ago #

    Simply commenting out the whole elseif structure that contains
    wp_get_attachment_image($id, $size, false); should work.

  5. juodikis
    Member
    Posted 1 year ago #

    Nope, that doesn't work. Commenting first if doesn't work as well. Commenting else doesn't show any gallery at all

Topic Closed

This topic has been closed to new replies.

About this Topic