Warning line in gallery post

Viewing 3 posts - 1 through 3 (of 3 total)
  • #2345
    WDBgood
    Participant

    I’m trying to upload multiple photos in one post. I clicked the upload gallery icon then I chose the gallery format. But this line keep appearing between the images:

    Warning: end() [function.end]: Passed variable is not an array or object in /home/sambgood/public_html/test/wp-content/themes/minimatica/functions.php on line 457

    That line doesn’t appear if I use just a featured image in standard format. But it continues to appear if I use a gallery in a standard format.

    If you could help me, I would really appreciate it. Thanks!

    #2346
    Daniel Tara
    Keymaster

    You helped me find a bug, thank you!

    You will need to change a little code to fix this.

    Open functions.php and go to line 457, this line:

    <?php if( !( $counter % 3 ) && ( $attachment != end( $attachmnts ) ) ) :

    replace the mispelled [code]$attachmnts[/code] with [code]$attachments[/code]

    In the end it should look like this:

    <?php if( !( $counter % 3 ) && ( $attachment != end( $attachments ) ) ) :
    #2347
    WDBgood
    Participant

    No, thank you! =D
    After following your instructions, I fixed the error. The gallery format now works wonderfully. Thanks again! It’s a great theme, and I’m so glad you’re offering it for free.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.