• Resolved ZaLiTHkA

    (@zalith)


    Right… First off, I can’t get this plugin to obey any custom rules I give it unless I use the shortcode directly in the built-in page editor; using do_shortcode in the template file always uses the default options (even though I change those ‘default’ options…).

    So I’m using the following shortcode in my page at the moment:
    [attachments label=doctitle doctype=all fields="title,caption,size" titletag="" nofollow=1]

    And I have the following code in my template file to display the page content:

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    	<div class="entry-content">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '' . __( 'Pages:', 'boilerplate' ), 'after' => '' ) ); ?>
    	</div><!-- .entry-content -->
    <?php endwhile; ?>

    All is well in the actual list of attachments, however this breaks the layout of elements that follow it (namely: the footer)… Looking at the source code, it appears to be adding a couple a few unnecessary closing tags at the end of the list.

    This is where the fun starts… Viewing the page source code, the example below is what’s being added with only one file attached to the page.

    Please note: I have replaced the website address with # and indented the tags to more clearly show the valid opening/closing tags in in the code, the last two closing tags for :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Please can someone tell me what the heck is going wrong here?? I’m running out of hair to pull out.. ??

    https://www.ads-software.com/extend/plugins/eg-attachments/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author emmanuelg

    (@emmanuelg)

    Hi

    Could you tell me where in the code, you see the unecessary closing tags? I didn’t succeed to fin them.

    Emmanuel

    Thread Starter ZaLiTHkA

    (@zalith)

    Sorry.. I didn’t realise my opening post had been ‘moderated’, it’s the first time I’ve had that happen to me. You’d think a notification email would be sent in cases like that….. :/

    Anyway, you can see the code added by the plugin here. I’ve indented the code that has correct opening and closing tags to make it easier to follow, the last two closing div tags are not supposed to be there though, and they aren’t when I remove the shortcode from the page and refresh it.

    Edit: Hang on… It’s not coming from this plugin. Now it’s showing up on all my pages, even those without the shortcode. What the heck..?

    Let me do a bit more digging first, there’s something I’m missing here..

    Thread Starter ZaLiTHkA

    (@zalith)

    Ok.. False alarm. Somehow a rule in my base reset stylesheet that I hadn’t edited in about 2 weeks suddenly started causing problems… Managed to fix it now. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: EG-Attachments] Plugin Adding Two Extra Closing DIV Tags’ is closed to new replies.