srpd
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Different excerpt lenght.i’m trying in other way, cutting the excerpt:
<?php echo '' .substr($post->post_excerpt,0,50); ?>but why $post->post_excerpt doesn’t work?
Forum: Fixing WordPress
In reply to: Different excerpt lenght.thanks 🙂
but is there a way to set it without using plugin?i’m studyng something like this
add_filter('excerpt_length', 'my_excerpt_length'); function my_excerpt_length($length) { if(in_category(14)) { return 13; } else { return 60; } }but the problem is that i can’t use category to define them.
Forum: Fixing WordPress
In reply to: How to change show post per page in category-ID.phpgood it work, thanks so much man 🙂
Forum: Fixing WordPress
In reply to: how to add loop in headerreally thanks for your help and for your patience 🙂
Forum: Fixing WordPress
In reply to: how to add loop in headerthanks, but i don’t want to hide post in header when i’m displaying single.php but i need to exclude category 248 from list in single.php. for example when i’m reading other post there is a next post link that redirect to a 248 category post, and i want to hide this category from dirrect access to post…
Forum: Fixing WordPress
In reply to: how to add loop in headeryes you are right, sorry.
Ok i try to explain: i have category 248, and category’s post must be showed only in the header on blog not in single.php. post details must not be showed, when i click on permalink in header’s post i’ll see a page like an archive a list of post in 248 category and not a link to single post.
uhmmmm sorry for my english, i hope you can understand what i’m saying 🙂Forum: Fixing WordPress
In reply to: how to add loop in headerhi MichaelH it works, really thanks, and there is a way to exclude category from single.php?
thanks again 🙂Forum: Fixing WordPress
In reply to: How to customize next_post_link()thanks, it works 🙂
Forum: Fixing WordPress
In reply to: How to add multiple sources url in fecth feedoh no problem, thanks to you for trying to help me 🙂
Forum: Fixing WordPress
In reply to: How to add multiple sources url in fecth feedok i solved in this way
// Get a SimplePie feed object from the specified feed source. $rss = fetch_feed(array('http://firsturl', 'http://secondurl' ));Forum: Fixing WordPress
In reply to: How to add multiple sources url in fecth feeduhmmm ok, thanks for asnwer but i’m reading this http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date?rev=1179894636 probably it is possible….
Forum: Fixing WordPress
In reply to: How to cut the post titlethanks so much 🙂
Forum: Fixing WordPress
In reply to: Post thumbnailsanyone can give me a hint or suggestion? 🙂
Forum: Fixing WordPress
In reply to: Post thumbnailsthis is the function that i’m trying to use :
<div id="related_post"> <h4>Questo articolo ti è piaciuto, allora leggi anche:</h4> <ul> <?php $rand_posts = get_posts('numberposts=5&orderby=rand'); foreach( $rand_posts as $post ) : ?> <li><a href="<?php the_permalink(); ?>"> <?php the_title(); ?><?php the_post_thumbnail( 'related-post-thumbnail' ); ?> </a></li> <?php endforeach; ?> </ul> </div>Forum: Fixing WordPress
In reply to: random postuhmmm i solved putting the code of random post in top of comments.php and not in single.php 🙂