• Resolved crzyhrse

    (@crzyhrse)


    Hello,

    I am enjoying learning how to use your plugin, and thank you that it is available and works so well…

    Here is what I am currently using… Is there a way to make the title link to the posting, and limit the length of the content to an adjustable excerpt…?

    [loop type=”sp_cpt”]
    [content field=”title”]
    [content]
    [/loop]

    I have looked/read through most everything here as well as what comes with the plugin and haven’t figured it out…

    Kind regards.

    https://ww.wp.xz.cn/plugins/custom-content-shortcode/

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

    (@miyarakira)

    Hello, thank you for the question and I’m sorry I wasn’t able to respond immediately.

    Yes, what you describe should be possible, something like:

    [loop type="sp_cpt"]
      <a href='[content field="url"]'>[content field="title"]</a>
      [content words="50"]
    [/loop]

    For the link, please note the single and double quotes.

    For the excerpt, you can also try: [content field="excerpt"].

    In addition, [content more="true"] or [content more="..."] will display the content up to the Read More tag inserted in the post editor. You have more control over the excerpt displayed, but you’ll need to do it for every post.

    I hope that helps!

    Thread Starter crzyhrse

    (@crzyhrse)

    Thank you very much for this… It is very helpful, and also gives me a little more of a grasp on how to use shortcodes with your plugin…

    Kind regards…

    Plugin Author Eliot Akira

    (@miyarakira)

    In the latest plugin update, I added a parameter to display the title wrapped in a link to its post. So, instead of this:

    <a href='[content field="url"]'>[content field="title"]</a>

    You can use:

    [content field="title-link"]

    Also, I added a shorter way to display fields using [field]. So, this is the shortest version:

    [field title-link]

    Thread Starter crzyhrse

    (@crzyhrse)

    Thank you for this, it is helpful, and seems to enable some more various possibilities for different CPTs, and easier as well…

    Also sort of a fix in that I believe I was finding I could use
    [content more="true"]
    or
    <a href='[content field="url"]'>[content field="title"]</a>
    but not both, because when I did apply both the title link would, instead of going to the individual post, link back to the same page of collected posts…

    With what you’ve added here both the Read more tag and the title link can now work together, both going to the individual post if its wanted…

    Learning how to use your plugin is also teaching me about shortcodes, which I am appreciating…

    Kind regards…

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

The topic ‘Title as a link…’ is closed to new replies.