Jump to content

Archived

This topic is now archived and is closed to further replies.

vogelwild

Excerpt length

Recommended Posts

vogelwild    24
vogelwild

Hello :)

 

Can anybody help me with my excerpts? I use DMS developer and I've tried to set the number of words in the exerpts to 25, but there is no way getting DMS to show only this 25 words. By default excerpts show 55 words. I've deactivated every single plugin, nothing changes. Maybe the solution is really easy, but I don't get it.

 

Thank you for your help!

 

Petra

Share this post


Link to post
Share on other sites
Jake    74
Jake

Hi Petra - Thanks for bringing this to our attention, it appears to be a bug and I've gone ahead and reported it to our development team.

 

In the meantime, I've got a workaround for you that I've tested and confirmed will do the trick. If you haven't already, you'll need to run off a base child theme for DMS. One is available for download at https://www.dropbox.com/s/g0tgq9ug1h1km98/dms-template-theme.zip and information on child themes is available at http://docs.pagelines.com/customize/base-child-theme.

 

Once you've got the new theme activated, from the WordPress dashboard navigate to Appearance - Editor and then under templates, click on Theme Functions (functions.php). At the very bottom of that document, add the following and then save.

function custom_excerpt_length ( $length ) {
		return 25;
}

add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

This will overwrite the default excerpt length in WP from 55 to 25.

  • Like 1

Have you searched the forums yet or checked out the DMS user docs?

PageLines geek, blogging at MyUntangledLife.com

Share this post


Link to post
Share on other sites
Simon    247
Simon

This was a bug and is fixed in next release thankyou.

  • Like 1

Share this post


Link to post
Share on other sites
vogelwild    24
vogelwild

Yes, thank you! I have already noticed it. Works perfectly now!

  • Like 1

Share this post


Link to post
Share on other sites
Rob    547
Rob

Fantastic!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • huntington
      By huntington
      just migrated from Frameworks to the newest DMS (pro)
       
      When I was using Frameworks, under the "Blog and Posts" settings, I used the "Allowed Tags" option in the Clip Excerpts to enable elements like <iframe><img><object> to appear in the excerpt shown on my blog page.
       
      I used that feature extensively... thankfully there's a legacy option that has enabled me to continue abusing that feature. 
       
      Is there a better way to be doing this (allowing, for example, images or embedded YouTube videos to show up in excerpts displayed on the Blog page?
       
       
    • SCMG Enterprises LLC
      By SCMG Enterprises LLC
      Remember to include as much information about your technical issue as possible for example:
       
      Website URL: www.worldwidewebsitestore.net
      Framework Version: dms 2
      WordPress Version: 4.x
      Plugins in Use: numerous
      Server/Host: really ?
      Screenshots: http://prntscr.com/5p2vk1
      Details: the newest / latest post has it's excerpt showing above the header on every category page... this behavior needs to be removed... how do we go about it ?
    • lance616
      By lance616
      Hi, i'm using Pinspro now
       
      i have a problem( ha, another problem..)
       
      why i cant do it like these:
       
      http://themes.pagelines.com/pinspro/
       
      and
       
      http://themes.pagelines.com/pinspro/category/quotes/
       
      i cant show Excerpts for template "PinsPro | Pins List" 
       
      else other post-template can do that
       
      Why ?
       
      here is my screenshot
       
      http://www.pocketourguide.com/wp-content/uploads/2014/10/螢幕快照-2014-10-08-下午6.37.14.png
      http://www.pocketourguide.com/wp-content/uploads/2014/10/螢幕快照-2014-10-08-下午6.37.39.png
       
      p.s i tried turn off all plugins, but has same problem...
       
       
       
       
    • gregory.guz
      By gregory.guz+
      Hi
      Is there any option to set up flipper thumbnail on the side rather than on top of the excerpts?, or some codding will be involved?
      Thanks
    • bwdsl247
      By bwdsl247
      Please take a look at bwise.wpengine.com/blog page in Firefox and Chrome.
       
      In Chrome, images appears correctly; In Firefox, they do not.
       
      I have Excerpts set to allow <IMG> tags. 
       
      Here's what I see:
       
      https://www.evernote.com/shard/s50/sh/68c136af-856e-43ea-9555-ab20cf9796bb/6b96f43ba3a4739f293831e8535bd401
       
      Suggestions?
       
      Thanks,
       
      Scott
       
      DMS Debug Info WordPress Version
      3.8.1
      WordPress Debug
      Disabled
      Multisite Enabled
      No
      Current Role
      Administrator
      Framework Path
      /nas/wp/www/cluster-1349/bwise/wp-content/themes/dms/dms
      Framework URI
      http://bwise.wpengine.com/wp-content/themes/dms/dms
      Framework Version
      2.0.2
      PHP Version
      5.3
      PHP memory
      256
      Mysql version
      5.5.27-28.1-log
      PHP type
      Apache2handler
      PHP User
      Posix functions are disabled on this host!
      OS
      Linux
      Installed Plugins
      advanced-custom-fields/acf.php
      ajax-thumbnail-rebuild/ajax-thumbnail-rebuild.php
      bootstrap-icons/bootstrap-icons.php
      bulk-delete/bulk-delete.php
      custom-post-widget/custom-post-widget.php
      custom-sidebars/customsidebars.php
      dms-plugin-pro/dms-plugin-pro.php
      gc-testimonials/testimonials.php
      jetpack/jetpack.php
      pagelines-customize/pagelines-customize.php
      pagelines-sections/pagelines-sections.php
      pagelines-updater/pagelines-updater.php
      post-types-order/post-types-order.php
      subscribe2/subscribe2.php
      wordpress-backup-to-dropbox/wp-backup-to-dropbox.php
      wordpress-importer/wordpress-importer.php
      wp-ban/wp-ban.php
×