Thread Starter
NoWe
(@nowe)
any advice would be appreciated
-
This reply was modified 8 years, 3 months ago by
NoWe.
How to add new fields is explained here. Making it also show up at the store template requires a custom template, and then include it.
Thread Starter
NoWe
(@nowe)
thanks for the reply
the example does work, however instead of a url and want a text field and I cant seem to figure out how to change toe following in to a text field
// Check if the ‘appointment_url’ contains data before including it.
$listing_template .= “\t\t\t” . ‘<% if ( appointment_url ) { %>’ . “\r\n”;
$listing_template .= “\t\t\t” . ‘<p>“>’ . __( ‘Make an Appointment’, ‘wpsl’ ) . ‘</p>’ . “\r\n”;
$listing_template .= “\t\t\t” . ‘<% } %>’ . “\r\n”;
This is how it will work. Replace ‘name_of_your_field’ with the name of your custom field.
$listing_template .= “\t\t\t” . ‘<% if ( name_of_your_field ) { %>’ . “\r\n”;
$listing_template .= “\t\t\t” . ‘<p>“><%= name_of_your_field %></p>’ . “\r\n”;
$listing_template .= “\t\t\t” . ‘<% } %>’ . “\r\n”;