Title: use shortcode in excerpt attribute?
Last modified: August 22, 2016

---

# use shortcode in excerpt attribute?

 *  Resolved [Janco147](https://wordpress.org/support/users/janco147/)
 * (@janco147)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/)
 * Hello,
 * Love collapse-o-matic!
 * Working on this site (all in dutch. sorry)
    [http://www.test4.websitehebben.com/portfolio/](http://www.test4.websitehebben.com/portfolio/)
   I ran into a problem.
 * I’d like to use other (Custom Content) shortcode inside your excerpt attribute.
   Like this:
    ‘[expand title=”lees meer” excerpt=”[field excerpt words=60 dots=
   false ]”][content][/expand]’
 * I’m doing it like this so a user can just input any text – let Custom Content
   chop it after 60 words – use one chunk as excerpt – expand it to full content.
 * So far it doesn’t take the excerpt from the Custom-Content-field. Is there a 
   workaround?
 * Thanks in advance
 * Janco
 * [https://wordpress.org/plugins/jquery-collapse-o-matic/](https://wordpress.org/plugins/jquery-collapse-o-matic/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5501862)
 * Hoi Janco,
 * First, no need to apologise about the Dutch. We are [quite](http://www.debarron.nl/)
   [big](http://sharp-line.nl/) [fans](https://www.youtube.com/watch?v=Q2b5vmlUC08).
 * The attribute does not currently accept shortcodes… but we’ll look into that 
   real quick and get back to you. Please stand by for a more thorough response.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5501868)
 * Officially [no](https://wordpress.org/support/topic/shortcode-nested-as-parameter-of-other-shortcode?replies=5)…
   but, we are working out a work-around…
 * Update: We have a[ work around](http://spacedonkey.de/1512/collapse-o-matic-excerpt-shortcode-test/)!
   You can download version 1.6.3a that supports the placeholder solution demoed
   at the link above directly from the Plugin Oven here: [http://plugins.twinpictures.de/plugins/collapse-o-matic/](http://plugins.twinpictures.de/plugins/collapse-o-matic/)
 * Please let us know if this is an acceptable work-around!
 *  Thread Starter [Janco147](https://wordpress.org/support/users/janco147/)
 * (@janco147)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5501942)
 * YES!!!
 * It’s a thing of beauty / “allemachtig prachtig”
 * I have this terrifyiung clump of shortcode now doing exactly what I was looking
   for: chopping any text after 60 words, width collapse/expand.
 * Here it comes:
    ‘<ul class=”pf”> [loop category=”portfolio”]
    - [<h4>[field title]</h4>](http://[field pfurl])[[field thumbnail]](http://[field pfurl])
      
      <p class=”pfexcerpt”> [expand title=”lees meer” excerpt=”%<%field excerpt 
      words=60 dots=false%>%” excerptpos=”above-trigger” swapexcerpt=” ” trigpos
      =”below” trigclass=”arrowright”][content][/expand] [/loop]’
    - watch it do its thing here
       [http://www.test4.websitehebben.com/portfolio/](http://www.test4.websitehebben.com/portfolio/)
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5501997)
 * Mighty, mighty! Looks like you just got an extra dollop of awesome-sauce, my 
   Dutch friend. We’ll test further and see if any thing else needs to be added 
   to the plugin before pushing it out to the repo.
 * In the meantime, if you are happy (and you know it) please consider [leaving a review](https://wordpress.org/support/view/plugin-reviews/jquery-collapse-o-matic)
   of the plugin or it’s support.
 * Issue marked as resolved. Resolved with a BULLET! Pang-pang-pang!
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5502160)
 * Hey, just a quick note… you should update to [version 1.6.3f](http://plugins.twinpictures.de/plugins/collapse-o-matic/)
   and make the following changes to any shortcode placeholders:
 *     ```
       %<% is now %{%
       %>% is now %}%
       ```
   
 * This is due to standard greater/less-than symbols [not being accepted in shortcode attributes across all versions of WordPress](http://codex.wordpress.org/Shortcode_API#HTML).
 * [http://spacedonkey.de/1512/collapse-o-matic-excerpt-shortcode-test/](http://spacedonkey.de/1512/collapse-o-matic-excerpt-shortcode-test/)
   
   has been updated to reflect this change.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘use shortcode in excerpt attribute?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-collapse-o-matic_fffeff.svg)
 * [Collapse-O-Matic](https://wordpress.org/plugins/jquery-collapse-o-matic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-collapse-o-matic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-collapse-o-matic/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-collapse-o-matic/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [collapse-commander](https://wordpress.org/support/topic-tag/collapse-commander/)
 * [nested shortcode](https://wordpress.org/support/topic-tag/nested-shortcode/)
 * [placeholders](https://wordpress.org/support/topic-tag/placeholders/)

 * 5 replies
 * 2 participants
 * Last reply from: [Baden](https://wordpress.org/support/users/baden03/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/use-shortcode-in-excerpt-attribute/#post-5502160)
 * Status: resolved