DISQUS

DISQUS Hello! Elliott Back's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Truncate Title: For Perogy

Started by elliottback · 8 months ago

No excerpt available. Jump to website »

6 comments

  • Hey...

    I don't know is you still follow this post comments.

    I want to use your plugin to truncate titles on the home page, but not on the individual post pages. I cannot find what would be the variable to identify the page. I have tried with $_SERVER["PHP_SELF"] but it returns "/index.php" for both the home page and the article page. Any time ?
  • If you're talking about wordpress, you can just call is_home() to find that out. Or if you want other things (such as categories, etc) just make it !is_single() && !is_page.
  • Great plugin!!

    Q: How can I apply only recent entries? ...the actual post page, i would like the title to stay as is.

    Thankx in advance,
    Arthur
  • soryyyyyyyyyy yyyyyyyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyy yyyyyyyy yyyyyyyyyyyyyy yyyyyyyyy yyyyyyyyyyyyyy yyyyyyyyyyyyyyyy yyyyyyyyyyyyy yyyyyyyyyyy yyyyyyyyyyy
  • Thank you very much, this plugin helped out a lot. I will give credit when the site i am working on launches.
  • Hi Elliot, can you please show us an example of how truncate titles by using "is_home" please?

    I tried this at the end of your plugin but doesn't work...

    if (is_home()) { add_filter('the_title', 'truncate_long_titles'); };

    Thank you!

Add New Comment

Returning? Login