mhjsam1
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Page isnot working.. HTTP 500 error.. previous topics didn’t help meThank you all problem is solved. Thanks for cooperation Seniors.
Forum: Fixing WordPress
In reply to: Page isnot working.. HTTP 500 error.. previous topics didn’t help meThere is no any issue in uploading php files because i had uploaded wp-admin and wp-include folder of latest wordpress from org to debug the issue as per recommended.But problem not solved.
Forum: Fixing WordPress
In reply to: Page isnot working.. HTTP 500 error.. previous topics didn’t help meI have enabled wp_debug also but it shows white blank page..it doesnot show http 500 like error also.And i cannot access to wp-admin also. No any error log in debug file also
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Category link & search questionI have used custom advert category dropdown named Pet Breed in search field . When user select the terms of advert_category i.e dogs, puppyetc, those selected values should be displayed in my custom search page like You have searched Pet Breed = dog,puppy .How to do that?
if (isset($_GET[‘advert_category’])) {$taxonomy = ‘advert_category’;
$terms = get_terms($taxonomy);
if ( $terms && !is_wp_error( $terms ) ) :
foreach ( $terms as $term ) {
print_r( $term );
if($term-> term_id == $cat)
echo “Pet Breed= “. $term->name;
}endif;
}
Its not working. It shows only one terms .Please tell me how to do?- This reply was modified 6 years ago by mhjsam1.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Remove Location from Search Boxurl with correct permalink is shown but it just dont do search . all result is displayed by default.I think code just dont run well. Url is private for now.sorry hope u understand. But can u help me with code.I just need to add custom select field in search form pet type with items dog and puppy.suppose user post advert in add product with pet type=dog.when user select pet type = dog in search form it just need to display adverts related to dog. Plz help me.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Remove Location from Search Boxadd_filter( ‘adverts_list_query’, ‘search_by_pet_type_query’ );
function search_by_pet_type_query( $args ) {
if( ! adverts_request( “pet_type” ) ) {
return $args;
}
$args[“meta_query”][] = array(
‘key’=> “pet_type”,
‘value’=> adverts_request( “pet_type” ),
‘compare’=> ‘LIKE’
);
return $args;
}
Plz tell me where i am wrong? this search query not working.I can’t figured out what is wrong?Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Remove Location from Search Boxadd_filter( ‘adverts_form_load’, ‘search_by_pet_type_form_load’ );
function search_by_pet_type_form_load( $form ) {
if( $form[‘name’] != ‘search’ ) {
return $form;
}$form[‘field’][] = array(
“name” => “pet_type”,
“type” => “adverts_field_select”,
“order” => 20,
“label” => __(“Pet Type”, “adverts”),
“max_choices” => 10,
“options” => array(
array( “value” => “Dog”, “text” => “Dog” ),
array( “value” => “Puppy”, “text” => “Puppy” ),
),
“meta” => array(
“search_group” => “visible”,
“search_type” => “half”
)
);
return $form;
}
I add this checkbox in search.And its not workingadd_filter( “adverts_form_load”, “my_adverts_form_load” );
function my_adverts_form_load( $form ) {
if( $form[“name”] != “advert” ) {
return $form;
}$form[“field”][] = array(
“name” => “pet_type”,
“type” => “adverts_field_select”,
“order” => 10,
“label” => “Pet Type”,
“is_required” => false,
“validator” => array( ),
“max_choices” => 2,
“options” => array(
array( “value” => “Dog”, “text” => “Dog” ),
array( “value” => “Puppy”, “text” => “Puppy” ),
)
);return $form;
}
And this filter to add or edit advert.
When i do pet type search, it shows all items. Can u tell me where i am wrong?Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Remove Location from Search BoxHow to add label Location in location field of search form?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Remove Location from Search BoxHow to add label Location in location field of search form?