Greg or this can be done.
Once the price is set as free instead of having the price show as free we can replace the free text with maybe “agents”
How can i replace the text “free” when price is set at zero
Hi,
you can remove the price field for not-logged-in users from the [adverts_add] form by adding the code below in your theme functions.php
add_filter( "adverts_form_load", "anon_remove_price_field" );
function anon_remove_price_field( $form ) {
if( $form['name'] != "advert" ) {
return $form;
}
if( get_current_user_id() > 0 ) {
return $form;
}
foreach( $form["field"] as $key => $field ) {
if( $field["name"] == "adverts_price" ) {
unset( $form["field"][$key] );
}
}
return $form;
}
This will allow you to have one form with the price field hidden if the user is not logged in.
If you need to have two separate pages with two different form schemes, then the best way to do that is to use the Custom Fields add-on.
Thanks Greg,
I want the price hidden for logged in user.
The other way round
Just change get_current_user_id() > 0 to get_current_user_id() == 0.
Greg That never worked as i wished.
I want when a user is not logged in they can pay for a normal or featured ad, so i have 2 for not logged in.
If a user logs in i want them to post for free
How can i do this please
Greg That never worked at all, the code did not change anything
I want when a user is not logged in they can pay for a normal and a featured ad, so i have 2 prices for not logged in.
If a user logs in i want them to post for free without seeing the price field
How can i do this please
This is not really possible right now, it would require some more complex custom programming, but i am afraid this is beyond the free support offered here, sorry.