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

    (@miyarakira)

    The plugin only offers a way to trim the excerpt length by number of letters or words.

    I imagine a few ways you can remove unwanted header/image/etc.

    1) The best way in my opinion is to create a field for the excerpts you want to show. That way you can display only what you need.

    2) Another options is to define the excerpts by going to Post edit -> Screen options -> Enable excerpt. This will require manual editing for all posts which you want to adjust. I noticed that Pages don’t have this option, so this might not be possible.

    2) Use CSS to hide what unwanted content. This can be tricky, if you need to remove only the first header, image, etc. For example..

    .textwidget strong:first-child,
    .textwidget .wp-caption:nth-child(2) {
      display: none;
    }
    Thread Starter adrian____

    (@adrian_-1)

    Thanks Eliot for all the suggestions.

    1) The best way in my opinion is to create a field for the excerpts you want to show. That way you can display only what you need.
    –> as I am using the field in a loop, to display different content for different pages. It seems this manual editing not feasible?

    2) Another options is to define the excerpts by going to Post edit -> Screen options -> Enable excerpt. This will require manual editing for all posts which you want to adjust. I noticed that Pages don’t have this option, so this might not be possible.
    –> No, this option is not available for Pages. Thanks.

    3) Use CSS to hide what unwanted content. This can be tricky, if you need to remove only the first header, image, etc.
    –> I will try this one and let you know how it works.

    Thanks a lot!

    Thread Starter adrian____

    (@adrian_-1)

    3) Use CSS to hide what unwanted content. This can be tricky, if you need to remove only the first header, image, etc.
    –> I will try this one and let you know how it works.

    This CSS change will hide the image on each individual content pages (https://www.chinadrugconsulting.com/registration-services/cfda-on-site-inspection/cfda-on-site-inspection-2015/ ), instead of the loop content page ( https://www.chinadrugconsulting.com/registration-services/cfda-on-site-inspection/ ).

    What I want to change is the loop content page, however…

    Thanks though.

    Thread Starter adrian____

    (@adrian_-1)

    the shortcode I am using is

    [loop type="page" parent="480"]
        <b>[field title-link]</b>
        <p><em>[field date]
        Published by China Drug Consulting</em></p>
        [field excerpt words="100"][content length="0" more=" Read more"]
    [/loop]
    Plugin Author Eliot Akira

    (@miyarakira)

    You can wrap the content to be targeted specifically:

    <div class="hide-these">
      [content words="100" more=" Read more"]
    </div>

    Then in the CSS:

    .hide-these strong:first-child,
    .hide-these .wp-caption:nth-child(2) {
      display: none;
    }

    This should hide only those elements. However, I think it’s not such a reliable solution. If the image or header (“Overview”, etc.) is moved or doesn’t exist, it will not work correctly.

    For #1, my idea was: you can create a custom field (with a plugin like Advanced Custom Fields) where the excerpt text for each page is placed. Then, you can display it with the [field] shortcode. It will be more effort but you can control the excerpt exactly.

    Thread Starter adrian____

    (@adrian_-1)

    “For #1, my idea was: you can create a custom field (with a plugin like Advanced Custom Fields) where the excerpt text for each page is placed. Then, you can display it with the [field] shortcode. It will be more effort but you can control the excerpt exactly. “

    You rock! This idea solved my issue perfectly.

    Thank you very much, Eliot.

    Plugin Author Eliot Akira

    (@miyarakira)

    Glad to know it worked for you. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is it possible to set the starting word for a field excerpt?’ is closed to new replies.