Title: Latest version &#8211; custom function error
Last modified: May 25, 2020

---

# Latest version – custom function error

 *  [salac](https://wordpress.org/support/users/salac/)
 * (@salac)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/)
 * Hi
 * After updating to latest version, my search function reports error. Below is 
   the part of the function that reports errors and is on line “,addSearchCondition(‘
   fuldenavn’,$metavalue)”. Function works fine until i update astra theme. Have
   you changed anything in the code of functions.php?
 * /* Start*/
    add_shortcode(‘user_search’,’My_User_search’); function My_User_search(
   $atts = null){ $out = user_search_form(); if (isset($_GET[‘user_search’]) && 
   $_GET[‘user_search’] == “search_users”){ global $wpdb; /* diabled searchby $metakey
   = $_GET[‘search_by’]; */ $metavalue = esc_attr( trim( $_GET[‘s_value’] ) );
 *  if( trim( $metavalue ) == false ){
    $out .= responseBody(error_missing_keyword_message());
   return $out; }
 *  /* if search by name, fuzzy search will apply */
    /* else search by custom fields*/
   $default_query = array( ‘meta_query’ => array(‘relation’ => ‘OR’ ,addSearchCondition(‘
   fuldenavn’,$metavalue) //Error is on this line ,addSearchCondition(‘post_nr’,
   $metavalue) ,addSearchCondition(‘by’,$metavalue) ,addSearchCondition(‘job_title’,
   $metavalue) ,addSearchCondition(‘firma’,$metavalue) ,addSearchCondition(‘tlf’,
   $metavalue) ,addSearchCondition(‘firma_adresse’,$metavalue)
 *  ));
 * Sasha

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

 *  Thread Starter [salac](https://wordpress.org/support/users/salac/)
 * (@salac)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/#post-12889542)
 * I forgot to mention that I using child theme
 *  [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * (@brainstormteam)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/#post-12891178)
 * Hello [@salac](https://wordpress.org/support/users/salac/)
 * If you have used the Custom Function in the child theme, it should not be affected
   by the theme update.
 * While can you try switching to the parent theme to see if it helps resolve the
   issue?
 * If you are still facing the issue, you might want to verify the Child theme code.
   And if you need the previous version of the theme for comparison you can find
   it [here](https://themes.svn.wordpress.org/astra/).
 * I hope that helps.
 * Regards,
    Suman
 *  Thread Starter [salac](https://wordpress.org/support/users/salac/)
 * (@salac)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/#post-12891904)
 * Hi Suman
 * I have tried switching to parent theme, but no luck.
    Page builder is Elementor
   and I keep getting this notification in elementor debugger.
 * Template File: No Templates for condition > /themes/astra/page.php
 * Regards
    Sasha
 *  [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * (@brainstormteam)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/#post-12892010)
 * Hello [@salac](https://wordpress.org/support/users/salac/)
 * I am not sure, what is the condition the custom code is looking for.
 * Can you verify the code? As the Custom Code needs to be re-checked to fix this
   issue.
 * There’s nothing from the functions.php of the current theme update that could
   cause this issue.
 * I hope that helps.
 * Regards,
    Suman

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

The topic ‘Latest version – custom function error’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.2/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Team Brainstorm Force](https://wordpress.org/support/users/brainstormteam/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/latest-version-custom-function-error/#post-12892010)
 * Status: not resolved