• Resolved stuartwaldner

    (@stuartwaldner)


    I created a new content type, Interviews, with seed pod.

    I have a landing page I created with Pods Templates.

    On this landing page, I display the most recent interview. Currently is displays the entire interview, which is rather long. My client has asked me to shorten the amount displayed and add a “read more” button after X number of words.

    I would greatly appreciate if someone could show me how to accomplish this. I’m not a programmer, so it needs to be somewhat basic or it will be over my head. Sorry.

    Thanks,
    Stuart

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @stuartwaldner

    The best thing you can use is the post excerpt.
    Your client can then set the short text and you can simply add a readmore button below that.

    Cheers, Jory

    Thread Starter stuartwaldner

    (@stuartwaldner)

    Thanks!

    I was able to make excerpts available to my Pods content type and added the following code to my child theme’s funcations.php file:

    <?php
    /**
    * Allow shortcodes in a Pods Template
    */
    add_filter( 'pods_templates_post_template', 'do_shortcode', 10, 1 );

    I was hoping that the above code would allow WordPress short codes (more) to work in my Pods content type, but it doesn’t. ?? Do you have any suggestions on this?

    Alternatively, IF I end up using the excerpts. I would put the first few paragraphs of the interview in the excerpt. How do I call up that excerpt in my Pods display?

    My Interview template code currently shows the entire interview, not just the excerpt.

    Here’s the code I have for the template:

    <h2>Welcome to Samuel's Interviews from Phoenix Rising, the quarterly newsletter from <a href="https://pi.phoenixinstitute.org">Phoenix Institute</a>. On this page you'll find over 100 Interviews on a wide variety of searchable topics. Use the search in the sidebar to search all interviews. Have fun!</h2>
    
     <hr color="#e91e63" size="10">
    
    <h1><strong>{@post_title}</strong></h1>
    
    <p>{@post_content}</p>

    Thanks for all your help!

    Stuart

    Thread Starter stuartwaldner

    (@stuartwaldner)

    I figured out I could call up the excerpt in my Pods Template by replacing:
    <p>{@post_content}</p>
    with
    <p>{@post_excerpt}</p>

    But I’m at a loss for how to add the “read more” button so that it takes the reader to the entire interview.

    Thanks for all your help!

    Stuart

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @stuartwaldner

    You can use the {@permalink} tag to link to your detailed post.

    Cheers, Jory

    Thread Starter stuartwaldner

    (@stuartwaldner)

    Hi Jory,

    Thanks! That was a big help.

    Is there a repository of tags somewhere on the Pods website that I can use as a reference for this kind of thing in the future? I checked, but I couldn’t find one.

    Thanks,
    Stuart

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @stuartwaldner

    No there isn’t a documentation on this since usually themes already support such a feature.
    If you view our introduction video there are some similar examples that are shown.
    We cannot post every use case example since it would overload the documentation since there are simply too many.

    Cheers, Jory

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Read More’ is closed to new replies.