WordPress.org

Ready to get started?Download WordPress

Forums

WP Carousel
[resolved] Page Excerpts? (6 posts)

  1. CowboyFrank
    Member
    Posted 2 years ago #

    Hi Sumolari. I really like this plugin, and it has been invaluable for me. I am using a plugin on my site that adds Excerpt fields for Pages (http://wordpress.org/extend/plugins/page-excerpt/). However, when I add a Page to a carousel, the carousel pulls in the page content for 'DESC', rather than what I've put in the new Excerpt field.

    Is there a quick way to mod the code to pull from this new Excerpt field? Thanks mucho!

    http://wordpress.org/extend/plugins/wp-carousel/

  2. sumolari
    Member
    Plugin Author

    Posted 2 years ago #

    I haven't used that page-excerpt plugin before, so I don't know how it works. I would try it and improve WP Carousel to make them compatible, but I'm a bit busy this month, so I think I will not be able to do that until december.

    In any case, if Page Excerpt uses WordPress's custom fields to store the excerpt of the pages, it will be really easy to use them as description.

    WP Carousel tries to load the value of custom field WP_CAROUSEL_CAROUSEL_TEXT and use it as description for any content, but as in most of the cases that custom field is empty, WP Carousel also loads the excerpt of the post.

    WP_CAROUSEL_CAROUSEL_TEXT is a constant, defined in wp-carousel.php near line 71. Just change "wp_carousel_carousel_text", the value of that constant with the name of the custom field that Page Excerpt uses and then WP Carousel will use the excerpt of the pages.

    But this will only work if in fact Page Excerpt plugin uses custom field, and I'm not sure about that as I haven't used that plugin before.

    Thanks for using WP Carousel, I'll try to implement this feature ASAP.

  3. CowboyFrank
    Member
    Posted 2 years ago #

    It's weird: When I look at the SQL database, the Page Excerpt plugin puts a Page's excerpt in the same data column as with all the Posts' excerpts. So Carousel ought to have no trouble pulling the data from the same place, right?

  4. CowboyFrank
    Member
    Posted 2 years ago #

    Fixed! I made a small change around line 4057 on wp-carousel.php:
    $return['desc'] = $post_temp->post_content;
    to read instead:
    $return['desc'] = $post_temp->post_excerpt;
    Thanks again for a great plugin!

  5. neiller
    Member
    Posted 2 years ago #

    CowboyFrank - Thanks ever so much for finding this out.

    I had to make two changes, and not in exactly the same place, but still in the wp-carousel.php file. I just did a search and replace, so your method is good!

    I also agree, this is a nice little plugin. Thanks Sumolari.

  6. TumbleweedMarketingAnalytics
    Member
    Posted 2 years ago #

    Hi CowboyFrank,

    I am seeking some code so that I can create excerpts using the Rotating Posts plugin by Mark Inderhees. I would like to insert code so that a post title, image and 200 words from each post rotate. And, I see from other forum discussions that you had submitted some code for this purpose - one year ago?

    Thanks,
    Tom Wolfer (a.k.a Tumbleweed)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic