LB
Forum Replies Created
-
Okay, will do, thanks so much for your help!
No, it’s just the shorten code that I can’t get to work.
For example, how to nest this:
<?php echo '<div class="newscontent">' . shorten($item->get_content(), 150) . '</div>';into your code that you used.
Ah!
Okay, so I tried pulling through the basic full content using this:
' . $item->get_content() . 'and it works!!!!
But now trying to shorten it, using this (which the guy in the thread you linked to, said worked):
<?php echo '<div class="newscontent">' . shorten($item->get_content(), 150) . '</div>';I run into problems since I’m not sure how to situate that inside the current code.
preg_match_all('/<img([^>]*)>/i', $item->get_content(), $matches); // Get all of the image tags setlocale(LC_TIME, 'fr_FR'); $all_images = $matches[0]; echo '<div class="network_news"> <div class="netnews_text"> <h2><a class="colorbox" href="' . $item->get_permalink() .'">'.$item->get_title(). '</h2></a> <span class="date">' . $item->get_date('j F Y').'</span> <span class="excerpt"> echo '<div class="newscontent">' . shorten($item->get_content(), 150) . '</div>'; </span> Source - <a class="lirelasuite" href="'. $item->get_permalink() .'" target="new"><span class="site-membre">'.$item->get_feed()->get_title() . '</span></a></div></div>'; if($counter >= $feedlimit) break;Thanks!
LaraGreat, I did this and it works! Thank you!
Just 1 thing:
I’m trying to include the excerpt by calling:
.$item->excerpt().For example:
echo '<div class="network_news"> <div class="netnews_text"> <h2><a class="colorbox" href="' . $item->get_permalink() .'">'.$item->get_title(). '</h2></a> <span class="date">' . $item->get_Local_date('%e %B %G').'</span><span class="excerpt-abundant">'.$item->excerpt(). '</span> Source - <a class="lirelasuite" href="'. $item->get_permalink() .'"><span class="site-membre">'.$item->get_feed()->get_title() . '</span></a></div></div>';But that doesn’t seem to work. Any quick fix you know of?
Wow, thank you SO much for the explanation! I’m going to try and implement it now.
Hi Jenny
Wow, you explained this all so well, and I am still not getting it totally since I am a Web Designer who is veering far out beyond my limits.
I’m actually trying to use your code to remove the time instances of ‘today’, ‘more than 2 days ago’ etc so that I just have one feed where I can control the maximum amount of items displayed.
I tried to use your complete code in wp-rss-aggregator.php but I wasn’t sure what to block out and what to leave in.
So disregarding the thumbnail bit, what exactly would I put in wp-rss-aggregator.php if I wanted it to display as I just explained?
Oh pretty please could you help me!