I am not really a developer, just can do bits and bobs and I am looking to change button text in a plugin but through a child theme.
What I've done is created the plugin folder structure as in original plugin and edited .php file in child theme. But it's not pulling through.
I am not sure if this is the way to do it - can someone help? This is the code I am looking to edit:
<input type="button" class="application_button button" value="<?php esc_attr_e( 'Apply for Job', 'wp-job-manager' ); ?>" />
I need to change "Apply for Job" to "Submit"
Full code in the original file is:
<?php if ( $apply = get_the_job_application_method() ) :
wp_enqueue_script( 'wp-job-manager-job-application' );
?>
<div class="job_application application">
<?php do_action( 'job_application_start', $apply ); ?>
<input type="button" class="application_button button" value="<?php esc_attr_e( 'Apply for Job', 'wp-job-manager' ); ?>" />
<div class="application_details">
<?php
/**
* job_manager_application_details_email or job_manager_application_details_url hook
*/
do_action( 'job_manager_application_details_' . $apply->type, $apply );
?>
</div>
<?php do_action( 'job_application_end', $apply ); ?>
</div>
<?php endif; ?>
I am not really a developer, just can do bits and bobs and I am looking to change button text in a plugin but through a child theme.
What I've done is created the plugin folder structure as in original plugin and edited .php file in child theme. But it's not pulling through.
I am not sure if this is the way to do it - can someone help? This is the code I am looking to edit:
<input type="button" class="application_button button" value="<?php esc_attr_e( 'Apply for Job', 'wp-job-manager' ); ?>" />
I need to change "Apply for Job" to "Submit"
Full code in the original file is:
<?php if ( $apply = get_the_job_application_method() ) :
wp_enqueue_script( 'wp-job-manager-job-application' );
?>
<div class="job_application application">
<?php do_action( 'job_application_start', $apply ); ?>
<input type="button" class="application_button button" value="<?php esc_attr_e( 'Apply for Job', 'wp-job-manager' ); ?>" />
<div class="application_details">
<?php
/**
* job_manager_application_details_email or job_manager_application_details_url hook
*/
do_action( 'job_manager_application_details_' . $apply->type, $apply );
?>
</div>
<?php do_action( 'job_application_end', $apply ); ?>
</div>
<?php endif; ?>
Generally speaking, you cannot change a plugin through a child theme, unless you use hooks the author has provided, or unless the author has allowed some of the plugin files to be overwritten.
However, as you only wish to change translatable text, you don't need any of this.
The above is a bit of a summary of how the plugin works. For more info about how to use Loco Translate: https://localise.biz/wordpress/plugin/manual/editor