Support » Plugin: Attachments » not want to show images in loop

  • Hi,

    I use your great plugin but this time I need to customize it… So I go to your tutorial…

    First I disable disable the default instance in wp-config.php…
    And Add in function.php code from “Create Custom Instances” because I need only title.. and I use code “Pulling Attachments to your Theme” in the loop … but I did not get anything??? the loop is empty.. In admin when I want to edit posts there is show ‘My Attachments’ .. and I upload image and save.. everything cool but from some reason not want to show it in loop..

    Just for info.. plugin works with default options.. I install plugin.. Upload image and use code in loop and its work.. but with this tutorial its not work.. I am not sure why??


Viewing 5 replies - 1 through 5 (of 5 total)
  • okay.. I found why is this happen.. can you please change your tutorial.. I think you have error there .. and maybe will good to change it because it can be a little confused 🙂

    Link to tutorial

    When you create “Create Custom Instances” you will write function

    function my_attachments( $attachments )

    and then in loop you will have this

    <?php $attachments = new Attachments( 'attachments' ); /* pass the instance name */ ?>

    but this is not good you need to change to this

    <?php $attachments = new Attachments( 'my_attachments' ); /* pass the instance name */ ?>

    Plugin Author Jonathan Christopher


    The documentation is specifically designed to outline the fact that your instance name needs to be passed, not copied and pasted from the docs. Many people get caught up just where you did but it’s a result of copying and pasting the sample code instead of reading the instructions on how to write your own. Very glad you were able to take a second spin through the docs and get it figured out, I hope you enjoy the plugin!

    okay.. yes I enjoy it.. thank you for this great plugin… only one idea.. what you think, to write in tutorial, that coder must change this part of code, to replace it with own name of function.. 🙂

    and one more question .. can this slider be responsive? if yes.. than you have best slider plugin on planet 🙂

    Plugin Author Jonathan Christopher


    The documentation does state that you need to pass in your own instance name, and the comment on the line you pasted reiterates that:

    /* pass the instance name */

    Attachments doesn’t do anything but interact with the admin and store the data, the idea being you can directly integrate with your favorite responsive slider very easily.

    great. .thank you very much for support

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘not want to show images in loop’ is closed to new replies.