WordPress.org

Forums

WordPress Shortcodes
card-full with custom content (2 posts)

  1. paxku
    Member
    Posted 10 months ago #

    Hi there!

    I'm using your plugin in one site really succesfully. The writers there are "non geeks", and they manage to do quite beautiful things thanks to your plugin.

    Now, I'm trying to use it in my own blog to create some custom "author cards".
    I mean, I want to create a shortcode which will use the card-full template, and I want to fill the template with a custom "name", "body", "thumbnail_image",...
    From the description of the editor, I understand I can do that, but it seems like I'm not able to, and I found info nowhere.

    I'm trying things like:

    [link_user id=1 template="card-full" body="custom body"]
    [link_user template="card-full"]
    %%item_thumbnail_src=http://example.com/example.png%%
    Link Text
    [/link_user]

    But they are not working.

    Could you please show me an example?

    https://wordpress.org/plugins/synved-shortcodes/

  2. Synved
    Member
    Plugin Author

    Posted 10 months ago #

    I'm not sure what you're trying to achieve but the "body" of the shortcode is simply the contents, and the thumbnail_src corresponds to the images associated to the user profile. So something like this:

    [link_user id=1 template="card-full"]
    custom body
    [/link_user]

    Will create an author card with the "custom body" as main text. If you want to override the image you will have to use a completely custom template, like this:

    [link_user id=1 template="custom"]
    <a class="synved-link-anchor %%class%%" href="%%link%%"%%tip_attribute%%><img class="synved-shortcode-thumbnail" alt="%%tip%%" src="http://example.com/example.png" width="100" height="100" /><div class="synved-link-body" style="height:100px;overflow:hidden;">%%abstract_markup%%</div></a>
    [/link_user]

Reply

You must log in to post.

About this Plugin

  • WordPress Shortcodes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.