macelfresh
Forum Replies Created
-
Forum: Hacks
In reply to: Exclude from search, the text containd in a specific div ?Sorry I’ve never used it.
What I’d do, which is a pain in the ass – I’m aware of that – is to make my own search function and SQL query, at least I’d get what I want as the output.Forum: Hacks
In reply to: Exclude from search, the text containd in a specific div ?do you have an example somewhere?
Forum: Hacks
In reply to: Find this querynotepad++?
Forum: Hacks
In reply to: Two Sites. Same Database. Similar Tables. C'est Posible'?you can select your database in wordpress, but more easily I think wordpress 3 now handles multisite install, a bit like drupal does : one install, a front personnalisation of the sub domain.
http://codex.wordpress.org/Create_A_Network
sinon c’est possible en français : http://blog.lahaut.info/2010/06/installation-de-wordpress-en-multi-domaines/
cheers
Forum: Hacks
In reply to: Exclude from search, the text containd in a specific div ?You could trim the result or if you do a print_r of your variable (use
< pre > markup) maybe you can retrieve the “raw” info of what your looking for. I do that with Drupal.Forum: Plugins
In reply to: save_post how to find post_id?Hi,
sorry I didn’t reply before, I didn’t have time to work on that again.
Thanks for the answer, it now works !
Tout de bon
Mac
Forum: Plugins
In reply to: Dynamic Pagination using $countHi,
I used something like this, to display hashes
<?php //will hold hashes of posts, by index in their cat $hash = Array(); $args=array( 'orderby' => 'count' ); $i = 0; //will hold cat ID and count of posts in it $nb_prj_cat = Array(); //find all categories foreach((get_categories($args)) as $category) { //desired cat if(($category->cat_ID == 5) || ($category->cat_ID == 6)){ //count posts in cat $nb_post = $category->category_count; //how many projects in cat $nb_prj_cat[$i] = array($category->cat_ID , $nb_post); //initiate hash $hash[$i] = 0; $i++; //echo $nb_post; //echo $category->cat_ID; } }<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php //we read it for each post //retrieve categories of post $cat = wp_get_post_categories($post->ID, $args); //read category considering its amount of posts for($i = 0; $i < count($nb_prj_cat[$i]); $i++){ //if cat of the post == one of the categories above if ($cat[0] == $nb_prj_cat[$i][0]){ $hash[$i]++; display html...I guess this works for a little amount of categories, and a bit abstract because of the 3 arrays, but maybe you can inspire from it somehow