Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter James Revillini

    (@jrevillini)

    I checked your code and it doesn’t look like you have this feature, but it’s easy to add. You can use my code here as a starting point if you like.

    remove_shortcode( 'credit_tracker_table' );
    	add_shortcode( 'credit_tracker_table', 'my_credit_tracker_table_shortcode' ) );
    
    	function my_credit_tracker_table_shortcode( $atts ) {
    		extract( shortcode_atts( array(
    			 'attachments' => false
    		), $atts ) );
    		if ( $attachments ) {
    			global $post;
    			$attachments    = get_attached_media( 'image' );
    			$attachment_ids = array();
    			foreach ( $attachments as $attachment ) {
    				$attachment_ids[] = $attachment->ID;
    			} //$attachments as $attachment
    			$attachment_ids = implode( ',', $attachment_ids );
    			$atts[ 'id' ]   = $attachment_ids;
    
    		} //$attachments
    		return ( credit_tracker_table_shortcode( $atts ) );
    	}

    So now the shortcode can be [credit_tracker_table attachments=true] and it’ll only output the credit table for attachments of the current post. Works within a post, page or even in the sidebar. Anybody can use this in the meantime if you want this functionality now. Just add it to your theme’s functions.php or in a custom plugin ideally.

    Plugin Author labs64

    (@labs64)

    Hi James,

    Thank you for using Credit Tracker and good feedback!

    We’ll schedule Shutterstock.com parser for one of next plugin releases:
    https://github.com/Labs64/credit-tracker/issues/17

    Best Regards,
    Labs64 Team

    Plugin Author labs64

    (@labs64)

    Sorry for this typo => of course “caption table for attachments” will be implemented.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘photo caption table for attachments to current post’ is closed to new replies.