• I’ve combined Shortcodes Ultimate with WCK and CC to build out my entire custom Intranet in about 24 hours – so big time kudos to you for this awesome plugin. I look forward to donating very soon if you allow it.

    There are some sections that can pretty much stay the way they are, but there are others where using Pass would be remarkably helpful. I also haven’t figured out how to run comparisons or show items by selection, so if you could get me started by converting just one page to use Pass and respond to a user’s selection and/or show sections/selections based on their permissions – that would be massively helpful and I can handle the rest.

    Here’s the code from my “Principals” page – it uses Shortcodes Ultimate to make tabs and then lists both regular posts (conversations) and a custom post type (tasks) in a specified order by tags (Now, Next, Later, Waiting, Done) for all principals (assigned content by category, but is also a custom post type “principals” for their profile pages).

    If you want to see this functionality in action, go to digitekt.com/colab and login as principal, urspecial2me then visit either Today or Principals.

    [su_tabs]
      [su_tab title="Trisha"]
    <h2>Now:</h2>
    [loop tag="now" category="trisha"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Next:</h2>
    [loop tag="next" category="trisha"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Later:</h2>
    [loop tag=“later” category="trisha"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Waiting:</h2>
    [loop tag=“waiting” category="trisha"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Done:</h2>
    [loop tag="done" category="trisha"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    [/su_tab]
      [su_tab title="Dorian"]
    <h2>Now:</h2>
    [loop tag="now" category="dorian"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Next:</h2>
    [loop tag="next" category="dorian"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Later:</h2>
    [loop tag=“later” category=“dorian”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Waiting:</h2>
    [loop tag=“waiting” category=“dorian”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Done:</h2>
    [loop tag="done" category="dorian"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    [/su_tab]
      [su_tab title="Heather"]
    <h2>Now:</h2>
    [loop tag="now" category="heather"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Next:</h2>
    [loop tag="next" category="heather"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Later:</h2>
    [loop tag=“later” category=“heather”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Waiting:</h2>
    [loop tag=“waiting” category=“heather”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Done:</h2>
    [loop tag="done" category="heather"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    [/su_tab]
      [su_tab title="Don"]
    <h2>Now:</h2>
    [loop tag="now" category="don"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Next:</h2>
    [loop tag="next" category="don"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Later:</h2>
    [loop tag=“later” category=“don”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Waiting:</h2>
    [loop tag=“waiting” category=“don”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Done:</h2>
    [loop tag="done" category="don"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    [/su_tab]
      [su_tab title="CG"]
    <h2>Now:</h2>
    [loop tag="now" category="cg"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Next:</h2>
    [loop tag="next" category="cg"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Later:</h2>
    [loop tag=“later” category=“cg”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Waiting:</h2>
    [loop tag=“waiting” category=“cg”]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    
    <h2>Done:</h2>
    [loop tag="done" category="cg"]
    <span style="color:#71489C;"><strong>[field author] posted:</strong> [field title-link] w/ [taxonomy category][if type="tasks"][is role="author,editor,administrator"] | <a href="[field edit-url]">Edit</a></span>[/is][else] - Conversation[/if]
    <span style="color:#dbc9ee;">[field excerpt]</span>
    [/loop]
    [/su_tab]
    [/su_tabs]

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 1 replies (of 1 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello, sorry for the late reply. Woo, this one’s an advanced use case – let me see..

    “..use Pass and respond to a user’s selection and/or show sections/selections based on their permissions”

    By “respond to selection”, I assume you mean by selected tab. And showing section based on “permissions” – I guess by user role? I’ll address that in the other thread you started.

    In the latest plugin update, I added a way to [pass] a list of items, which I think will be helpful in simplifying your code.

    [su_tabs]
      [su_tab title="Trisha"]
        [pass list="now, next, later, waiting, done"]
          <h2>{Item}:</h2>
          [loop tag="{ITEM}" category="trisha"]
            ...
          [/loop]
        [/pass]
      [/su_tab]
      ...
    [/su_tabs]

    It loops through each item in the list and replaces {ITEM} with the item (“next”) and {Item} with the capitalized item (“Next”).

    OK, I made another update (1.6.2) just now to allow for nested pass. So now it should be possible to do:

    [su_tabs]
      [pass list="trisha, dorian, heather, don, cg"]
        [su_tab title="{Item}"]
          [-pass list="now, next, later, waiting, done"]
            <h2>{-Item}:</h2>
            [loop tag="{-ITEM}" category="{ITEM}"]
              ...
            [/loop]
          [/-pass]
        [/su_tab]
      [/pass]
    [/su_tabs]

    As you see, [pass] will replace {ITEM} and [-pass] will replace {-ITEM}.

    Whew, let me know if that works!

Viewing 1 replies (of 1 total)
  • The topic ‘Can you help me convert these to Pass and selectable?’ is closed to new replies.