dunkkan
Forum Replies Created
-
Forum: Plugins
In reply to: Help to display random post from one cat<ul> <?php $rand_posts = get_posts('category_name=WHATEVER&numberposts=5&orderby=rand'); foreach( $rand_posts as $post ) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </ul>It should work !
Forum: Fixing WordPress
In reply to: Questions about Database sizeHello mrmist, thanks for the reply. However, where do I find the php.ini ? I know I have one in my local WAMP installation, but don’t know if that have something to do.
By the way I’ve read that you cannot upload a big database by ftp, because the ftp ‘interacts’ with it. What does that means ?
Could I avoid that – and make the import internally in the server, after the upload ?
I’ve been reading the Cache docs too, and it seems like WP can resist quite well a catalog. π
Thanks for the feedback.
Forum: Themes and Templates
In reply to: Getting thumbnails of images attached to a post?Same problem here,
Does anybody knows how to solve it ? thanks !Forum: Fixing WordPress
In reply to: [How To] Show Posts Related To Category Only?Hello, you must give a try to :
http://playground.ebiene.de/400/related-posts-by-category-the-wordpress-plugin-for-similar-posts/
Forum: Plugins
In reply to: How to show links to other posts from same Category?Sorry this one is better :
http://playground.ebiene.de/400/related-posts-by-category-the-wordpress-plugin-for-similar-posts/
Forum: Fixing WordPress
In reply to: List other posts from current categorySorry, I was Γ la dΓ©rive before I found this true gem.
Forget the links and spread the word !
http://playground.ebiene.de/400/related-posts-by-category-the-wordpress-plugin-for-similar-posts/
Download and install.
Then, paste the code shown in the site anywhere in your template : after the loop, in sidebar.php, in the footer, where you want.I did it after my loop :
<!-- THIS IS MY MINIMALIZED POST for showing purposes --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php the_content(); ?> <?php endwhile; endif; ?> <!-- YOU WILL ADD HERE THE PROVIDED CODE once the plugin is installed --> <?php related_posts_by_category( array( 'orderby' => 'post_date', 'order' => 'DESC', 'limit' => 5, 'echo' => true, 'before' => '<li>', 'inside' => '» ', 'outside' => '', 'after' => '</li>', 'rel' => 'nofollow', 'type' => 'post', 'message' => 'no matches' ) ); ?>Read carefully the code. In “limit” don’t hesitate to change the number of posts to display.
I’m enjoyin an ultrafast, hyper-neat, super-short never-error hypra-related posts plugin with it π
And my loop is a chaotic disaster, so this one is pure warranty.
Hope this helps.
Forum: Plugins
In reply to: How to show links to other posts from same Category?Here there’s some interesting info :
a thread -> http://wordpress.org/support/topic/179755?replies=1
another -> http://wordpress.org/support/topic/189282?replies=7In the first one, the person forgot to close the php, so you must add at the end of the code that :
<?php endforeach; ?> <?php endforeach; ?>(yes, two times)
The second thread, I’ve not tried it out (I’m going to)
Forum: Fixing WordPress
In reply to: List other posts from current categoryHere there’s some interesting info :
a thread -> http://wordpress.org/support/topic/179755?replies=1
another -> http://wordpress.org/support/topic/189282?replies=7In the first one, the person forgot to close the php, so you must add at the end of the code that :
<?php endforeach; ?> <?php endforeach; ?>(yes, two times)
The second thread, I’ve not tried it out (I’m going to)
Forum: Plugins
In reply to: Show related posts with excerpt and key/valueI’ve tried the following, which doesn’t throw error messages π But it seems to filter all the tags.
$posttags = get_the_tags(); if(strpos($posttags->nice_name,"THE WORD TO EXCLUDE HERE")!==false){ if ($posttags) { foreach($posttags as $tag) { $sep = ( $tags ) ? ',' : ''; $tags .= $sep . '\'' . $tag->name . '\''; } } }What I’ve added is this part
if(strpos($posttags->nice_name,"THE WORD TO EXCLUDE HERE")!==false){, and the final closing
}Please help
Forum: Plugins
In reply to: link from single.php to template.phpI don’t know if it’s related but, “grab the post ID” can work ?
nobody ? π
Forum: Fixing WordPress
In reply to: How can exclude some tags from ‘the_tags’ list?You guys you’r da mastas’
Could I modify the Otto’s code (Otto, if reading, how do I modify your code) to exclude, not a compact tag, but an expresion foundable in a tag ?
Let’s say I have a tag : Lions in The Circus.
And : Birds in The Circus.
And I need to exclude every tag where the ‘Circus’ expression is present.
I know the first solution allows that, but it serves to print a conventional list of tags, when my intention is use the filtered query for another purpose (a customized related posts plugin).
With a generic function I could get it.
It must be out there some magical bit of code, some !empty function, or switch, or any of this magical php words which can work it out.So please, let’s awake this threat π
Cheers
Forum: Plugins
In reply to: Show related posts with excerpt and key/valueWell, complete begginer here, but, how to exclude a determinated tag, or, to be more specific, a tag containing a determinated WORD, to be displayed in that code ?
I’m learning a lot of PHP but to do that… I’m lost. Meanwhile if someone can figure out the right syntax it could be cool.
By the rest, I got it working and it’s really cool.
Did you have any succes with this ? I’m trying to do the same thing. But this plugin seems to be something related to the printable version of a post …
Forum: Plugins
In reply to: Custom Fields SearchYes please, we need more info : where must we place de code ? in functions.php, in search.php ? π
Forum: Plugins
In reply to: spliting a long excerpt in two columnsOkay I can add some html inside the custom excerpt field. Sorry it was too easy ! π