• Resolved odie2

    (@odie2)


    Hi,

    I gone wild and created own tree for downloads (see Dokumenty).

    It looks like:

    '[downloads
    	category="'. $category['slug'] .'"
    	category_include_children="false"
    	template="button"
    	loop_start="<div class=\'download-category\'><'. $tag .'><a href=\''. get_permalink() . $category['slug'] .'/\'>'. $category['name'] .'</a></'. $tag .'>"
    	loop_end="'. htmlspecialchars($children) .'</div>"
    	before=""
    	after=""
    ]'

    Where:

    • $category is current category (from friendly URL).
    • $tag is hierarchical number for header.
    • $children is calling to itself of function – $children = ( count( $category['children'] ) ? print_categories( $category['children'], $i_tag + 1 ) : '' );.

    I have one of main category, which have nothing in itself – Pozosta?e pliki – however childrens have, for example Pozosta?e 2011/2012

    As you can see they appears in dropdown and files’ main page as I set 'hide_empty' => false, for queries.
    Can I set something similar to [downloads] shortcode, as I don’t see anything related in documentation (category_include_children don’t do the job as then files are cloned under parent and children)?
    As summary – I need to loop_start and loop_end were executed depending not on if certain category is empty of files.

    (Maybe I could check for source code for myself, but I will fall asleep in a moment and maybe above code will be useful for future readers.)

    Thanks in advance,
    Greetings

    https://www.ads-software.com/plugins/download-monitor/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter odie2

    (@odie2)

    Anyone?

    Plugin Contributor Barry Kooij

    (@barrykooij)

    What you’re looking for here is custom development and unfortunately I can’t help you with that. I suggest you ask your question somewhere created for these kind of questions like wordpress.stackexchange.com or consider hiring a developer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[downloads] shortcode – loop for empty’ is closed to new replies.