2,896 reputation
149
bio website codeseekah.com
location EAX Register
age 25
visits member for 1 year, 7 months
seen 2 days ago
stats profile views 153

In love with ASM, C/C++, Python and PHP/MySQL, dissecting WordPress


Mar
26
comment How to control which category will be picked for the slug of a post?
@TigrouMeow, I don't see how high IDs would help with intersecting categories. This is purely a matter of pruning the right ID (stored in post meta data for example) out of the many you have, faking as if the only category the post belongs to is the one you need. The category IDs have to be managed (pruned) on a per-post basis, you can't expect all posts to rely on a predefined ID order of the categories. Post A may want to have Category B and Post B may want to have category A, though both posts are in both categories.
Mar
26
comment How to control which category will be picked for the slug of a post?
@TigrouMeow, so the short answer appears to be "not yet", core.trac.wordpress.org/ticket/18752 was supposed to handle this, still waiting. Other than that hope my hacks helped you understand how it all works.
Mar
26
revised How to control which category will be picked for the slug of a post?
added 118 characters in body
Mar
26
revised How to control which category will be picked for the slug of a post?
added 29 characters in body
Mar
26
revised How to control which category will be picked for the slug of a post?
added 29 characters in body
Mar
26
comment How to control which category will be picked for the slug of a post?
@TigrouMeow I'm updating the answer little by little in search for a good solution. There appear to be no plugins for this. Except maybe wordpress.org/extend/plugins/custom-permalinks which is isn't too nice.
Mar
26
revised How to control which category will be picked for the slug of a post?
added 233 characters in body
Mar
26
revised How to control which category will be picked for the slug of a post?
added 233 characters in body
Mar
26
answered How to control which category will be picked for the slug of a post?
Mar
26
comment Is there any plugin to publish exam result?
+1 for the 3rd point, although I would add "...unless you are one [a developer]", since we can't make assumptions on who is going to read the answer.
Mar
26
answered How to modify the Register link in the login page?
Mar
26
answered Redirect Site Geologically
Mar
25
comment Unhook the comment form in Buddypress
Show us the original add_filter for that function in the parent theme; that's what I've been asking for. I'm sure the original hook function is the same, but is the priority of the original hook you're removing really 10?
Mar
25
comment Unhook the comment form in Buddypress
"Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure." have you made sure?
Mar
25
comment Unhook the comment form in Buddypress
...again, the remove_filter function has to be used with the SAME exact arguments that the filter was added with. Meaning that if the filter was added like this: add_filter( 'tag', 'function', 12, 3 ); it should be removed with remove_filter( 'tag', 'function', 12, 3 ); - the exact same arguments have to be used. It will not be removed otherwise. So are you sure that your remove function matches the add function in the parent theme?
Mar
25
comment Unhook the comment form in Buddypress
The remove_filter function has to be used with the exact same arguments that the filter was added with. You said you have a child theme, so the parent theme contains and add_filter somewhere, you have to remove it with the exact same arguments (priority, numargs) to actually remove it. Find add_filter( 'comment_form_defaults', 'bp_dtheme_comment_form' ... ) and make sure it's got the same exact arguments that you're using to remove. Hope that makes sense.
Mar
25
comment Unhook the comment form in Buddypress
Kindly provide the context in which the form is hooked in the original functions.php, the original filter has most probably not been added at that stage yet, wrap it in an 'init', 999 action, or later.
Mar
25
comment Passing url parameters with search form
Sorry, meant add_query_var actually :) thanks for pointing that out.
Mar
24
comment Passing url parameters with search form
I think you need add_query_arg..‌​.
Mar
24
answered How can I create a smarter .htaccess file that will add a directory?