chacha2000
Forum Replies Created
-
Forum: Plugins
In reply to: "Update" nonces on login/logoutHi!
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
In reply to: [Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn'tHi! 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
In reply to: [Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn'tHi! 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
In reply to: [Rewrite Rules Inspector] rewrite rule applies to pages although it shouldn'tApparently 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
In reply to: trouble with this function : wp_unschedule_eventI 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
In reply to: wp_insert_postThanks for clearing that up ! Problem solved !
done !
Forum: Networking WordPress
In reply to: Can't access wp-admin for additional sitesI 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)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(); ?>
Indeed, no problem with the beta !
Thanks : )