• Resolved Dr. Killjoy

    (@dr-killjoy)


    Hello!

    I took me a while to find a plugin that puts seperate posts in a nice set of column, so thanks for doing the job!

    I have a question. On my test website, I’m trying to get an overview of all my blog posts, that include a Soundcloud widget code (not the wordpress shortcode) using your plugin.

    Unfortunately it doesn’t show the embed code, though every post starts with the embed code. Could you tell if there is a way the embed code is actually made visible in the ‘columned’ posts?

    If you can help me out on this, I will certainly be very grateful!

    By the way, you can find an impression on http://test.muziektaal.nl
    Ideally, in the end I will get to have the posts show as the bunch of posts down below, in the grey area. But that mostly is a css thingie.

    http://wordpress.org/extend/plugins/column-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Dr. Killjoy

    (@dr-killjoy)

    While I waited, I managed to uncover the Excerpt field in the wordpress admin area. It was neatly hidden, but I discovered, with the help of another thorough search on the interweb.

    It was located in the rolldown menu (something with screen setting) at the top right, while editing the post.

    Now that I found the Excerpt field, I am able to include HTML in my Excerpt. BUT… not all went well.

    It prints all the post titles correctly. But for some reason, with every post it prints, it prints the excerpt of the first post. While I had filled in the excerpt of every single post, and so it should print the excerpt of the respective posts.

    Did I put some code on a place where I shouldn’t have? Of course I will try and find the solution later today, but if anyone can help finding it, it would be much appreciated!

    Here’s the address again: http://www.test.muziektaal.nl

    Bye!

    Plugin Author lebasca

    (@lebasca)

    Hi Dr. Killjoy,

    Yes, there is a way to show the embed code but my solution will make shortcodes work in all WordPress Post Excerpts.

    These are the steps to follow:
    1) Open the functions.php file located in your WordPress theme.
    2) Add the following code after the <?php line:

    remove_filter(‘get_the_excerpt’, ‘wp_trim_excerpt’);
    add_filter(‘get_the_excerpt’, ‘custom_trim_excerpt’);

    function custom_trim_excerpt($text = ”)
    {
    $raw_excerpt = $text;
    if ( ” == $text ) {
    $text = get_the_content(”);

    $excerpt_length = apply_filters(‘excerpt_length’, 55);
    $excerpt_more = apply_filters(‘excerpt_more’, ‘ ‘ . ‘[…]’);
    $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
    }
    return apply_filters(‘wp_trim_excerpt’, $text, $raw_excerpt);
    }
    add_filter(‘get_the_excerpt’,’do_shortcode’);

    3) Save the file

    It should work but if there is any other page using the WordPress function “get_the_excerpt”, the shortcode will be shown.

    Hope it helps you.

    Plugin Author lebasca

    (@lebasca)

    Why are you writing excerpts for all your posts in the Excerpt field of each post? By default, the excerpt is shown by taking the first 55 characters of your post content. To enable the excerpts in my plugin, you have to go to the dashboard / Settings / Column Posts. Go to the Post section and check the show excerpt box.

    Thread Starter Dr. Killjoy

    (@dr-killjoy)

    Hi Lebasca,

    Thanks for the response. I also noticed that you did an upgrade of the plugin. Actually I started by looking into what that update would bring in difference and now I noticed that it now shows the text under Excerpt with the embed code of Soundcloud! That is just so awesome!

    I use Column Posts on my frontpage/homepage, where I use the Excerpt field to write little teasers that will lead people to the actual article and playlist, which doesn’t contain the text from the Excerpt field.
    So it is more a summary, then an introduction. Hope I made it a bit clear 😉

    Anyway, I will reward you for your work! I am much grateful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Embed code inside 'columned' posts’ is closed to new replies.