Title: chacha2000's Replies | WordPress.org

---

# chacha2000

  [  ](https://wordpress.org/support/users/chacha2000/)

 *   [Profile](https://wordpress.org/support/users/chacha2000/)
 *   [Topics Started](https://wordpress.org/support/users/chacha2000/topics/)
 *   [Replies Created](https://wordpress.org/support/users/chacha2000/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/chacha2000/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/chacha2000/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/chacha2000/engagements/)
 *   [Favorites](https://wordpress.org/support/users/chacha2000/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: ["Update" nonces on login/logout](https://wordpress.org/support/topic/update-nonces-on-loginlogout/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/update-nonces-on-loginlogout/#post-3757545)
 * Hi!
    I’m still looking for a way to do this… Could somebody please help? :'( 
   My only idea for now would be to update the `/* <![CDATA[ */` part directly after
   creating new nonces… what do you think ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn't](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/#post-3479251)
 * Hi! Yes, indeed, this has nothing to do with the plugin itself, i just used the
   plugin to identify what was going on, and posted in “plugins and hacks” with 
   a link to the plugin because i thought it was the most appropriate place to post
   and get some help from the community!
    If anyone reads this and has any idea 
   of why the pages “pick up” the first part of the custom tag from my custom post
   type slug rewrite, please let me know ! (my custom post type slugs look like 
   this : `%something%/%something_else%/%another_thing%` The pages pick up the “%
   something%” and therefore, don’t work anymore (the home page gets loaded instead).
   But if i put something in front of that %something% in my slug rewrite, it works!
   even if i put a small dash sign and the rewrite slug becomes `-%something%/%something_else%/%
   another_thing%` it works just fine ! But i don’t want anything in front, and 
   most inportantly, i’d like to understand why pages behave this way ! Does anyone
   have a clue?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn't](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/#post-3479208)
 * Hi! Thanks for your answer !
    I tried your code but i’m still not there.. What
   i’m trying to do is not to get rid of the slug, but to build a cutom one, with
   variations depending on the type of the custom post type, whether the post has
   a parent or not, belongs to one category or another, etc… But if i replace the“/”
   in here : `$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link);`
   with something else, i get 404’s… The structure is right in the adress bar etc…
   but i get 404’s. I tried with `$post_link = str_replace( '/' . $post->post_type.'/','/
   test/', $post_link );` but same thing : 404. How can i replace the ‘/’ and get
   my pages working right? Thanks again for taking the time to look into my problem!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn't](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/rewrite-rule-applies-to-pages-although-it-shouldnt/#post-3479065)
 * Apparently it has something to do with the fact that the slug (rewrite) defined
   for some of my custom post types begins with that “%custom_tag_not_for_pages%”;
   because if i change the slug to “test/%custom_tag_not_for_pages%” everything 
   works fine… but i don’t want to write anything in front of %custom_tag_not_for_pages%:/
 * Actually it seems that the pages are trying to use any %tag% used at the beginning
   of the slug for any of my custom post types… how to prevent them from doing that?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [trouble with this function : wp_unschedule_event](https://wordpress.org/support/topic/trouble-with-this-function-wp_unschedule_event/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/trouble-with-this-function-wp_unschedule_event/#post-3463852)
 * I found a solution to my problem : i used intval() on a variable i use in my 
   arguments array..
    that’s probably because the variable sent to wp_schedule_single_event
   came from $wpdb->insert_id and the one sent to wp_unschedule_event came from 
   a custom sql query..
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [wp_insert_post](https://wordpress.org/support/topic/wp_insert_post-3/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/wp_insert_post-3/#post-3457903)
 * Thanks for clearing that up ! Problem solved !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories] [Plugin: Post Expirator] Add to a category instead of replacing](https://wordpress.org/support/topic/plugin-post-expirator-add-to-a-category-instead-of-replacing/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-post-expirator-add-to-a-category-instead-of-replacing/#post-3041760)
 * done !
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Can't access wp-admin for additional sites](https://wordpress.org/support/topic/cant-access-wp-admin-for-additional-sites/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [14 years ago](https://wordpress.org/support/topic/cant-access-wp-admin-for-additional-sites/#post-2860504)
 * I ended up finding a solution myself, if anyone’s interested, i just added
 *     ```
       define('ADMIN_COOKIE_PATH', '/');
       define('COOKIE_DOMAIN', '');
       define('COOKIEPATH', '');
       define('SITECOOKIEPATH', '');
       ```
   
 * to my wp-config.php file !
    It’s perfectly working in all browsers now (front
   and back end)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Favorite Posts] [Plugin: WP Favorite Posts] Display amount of favorites for individual posts](https://wordpress.org/support/topic/plugin-wp-favorite-posts-display-amount-of-favorites-for-individual-posts/)
 *  [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wp-favorite-posts-display-amount-of-favorites-for-individual-posts/#post-2501236)
 * Hi everyone, try adding this to your functions.php file :
 *     ```
       function wpfp_get_current_count() {
           global $wpdb;
       	$current_post = get_the_ID();
           $query = "SELECT post_id, meta_value, post_status FROM $wpdb->postmeta";
           $query .= " LEFT JOIN $wpdb->posts ON post_id=$wpdb->posts.ID";
           $query .= " WHERE post_status='publish' AND meta_key='wpfp_favorites' AND post_id = '".$current_post."'";
           $results = $wpdb->get_results($query);
           if ($results) {
               foreach ($results as $o):
                   echo $o->meta_value;
               endforeach;
           }else {echo( '0' );}
       }
       ```
   
 * And then just use this in your template files to display the number of “favorites”
   the current post has received `<?php wpfp_get_current_count(); ?>`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Dave's WordPress Live Search] [Plugin: Dave's WordPress Live Search] Html output – Why is under the footer ?](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-html-output-why-is-under-the-footer/)
 *  Thread Starter [chacha2000](https://wordpress.org/support/users/chacha2000/)
 * (@chacha2000)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-daves-wordpress-live-search-html-output-why-is-under-the-footer/#post-2604957)
 * Indeed, no problem with the beta !
    Thanks : )

Viewing 10 replies - 1 through 10 (of 10 total)