Tuesday, 15 February 2011

Wordpress "Warning: Missing argument 2" errors -


I have 2 super specific 'missing logic 2' errors, this is all good in Localhost, but once I have completed This is returning the errors online:

A) Warning: missing logic for add_category_to_single () in / home / content / 23/9090823 / html2 / extranet / printedcrush / Wp-content / themes / facepress / functions.php on line 89

code:

  add_filter ('body_class', 'add_category_to_single'); (Line 89) function add_category_to_single ($ squares, $ square) {if (is_single ()) {global $ post; $ $ {$ Classes [] = $ category- & gt; as foreign currency ($ get_the_category ($ post- & gt; id)). Category_nickname; }} Return $ squares; }  

B) WARNING: Missing argument in /home/content/23/9090823/html/extranet/printedcrush/wp-content/themes/facepress/functions.php in my_class_names () On line 100

code:

  add_filter ('body_class', 'my_class_names'); (Line 100) function my_class_names ($ classes, $ class) {if (S_single ()) {global $ post; $ $ {$ Classes [] = $ category- & gt; as foreign currency ($ get_the_category ($ post- & gt; id)). Category_nickname; }} If (! (Is_user_logged_in ())) {$ classes [] = 'Log-out'; } Return $ class; }  

Does anyone know how these errors can be fixed? Thanks in advance. :)

body_class filter hook accepts a single parameter, array of The sections have to be modified, such as:

  add_filter ('body_class', 'so29108478_body_class'); Function SO29108478_body_class ($ classes) {$ classes [] = 'my-class'; Return $ class; }  


No comments:

Post a Comment