Introduction to templates
WPJobBoard template files are available in wp-content/plugins/wpjobboard/templates/ directory. Each module (jobs or resumes) has it’s own directory with templates, respectively “job-board”, “resumes”, “widget”. Every file starts with a short documentation along with list of variables available in this template.
If you wish to modify one of template files, here is the correct way to do it. Go to your WordPress Theme (for example “twentyten”) directory, wp-content/themes/twentyten, and create a “wpjobboard” directory here. Next let’s assume we want to modify “Add Job” page. The original template for this file is located in wpjobboard/templates/job-board/add.php. So create another folder called job-board and copy there file add.php.
Now, as a template for “Add Job” page, WPJobBoard will use file in wp-content/themes/twentyten/wpjobboard/job-board/add.php. The reason for creating new file instead of modifying original file, is that once you update WPJobBoard you would lost all modification you made.
How Template engine works
On activation WPJobBoard creates “Jobs” and “Resumes” WordPress pages. The job board content is generated when “wp” filter is applied. When rendering content (usually in WordPress page.php template) generated job board page replaces default page content (the_content()).
In other words when the_content() function is executed in the template, job board is generated instead of page content entered in the text editor if WPJobBoard detects that current page is a Job Board.
Hi Greg?First I must commend ur good work.I intend building a child theme off the Wp-joboard theme.I follow the normal procedure from here but i still dont have availble features like the main search bar in the home page of the parent theme.I copied the folder Job-board from the parent and it fixed it.I just want to know I am on the right track? pls reply. Thanks.
Hi, the theme was developed before child themes were introduced, and was never tested if it’s compatible with child themes. As for now I think that better approach is to just make a copy of wpjb-theme.
yeah but if i did made a copy it might affect my future upgrade?
Is this still the case or can this plug in work with child themes now?
@Kelly, WPJobBoard should now work fine with child themes.
Greg,
When I create a Child Theme (with only Template: jobeleon and @import url(‘../jobeleon/stylesheets/style.css’); in the style.css file, the child theme is buggy (checkbox, count, input boxes look nude).
Any idea ?
Most likely in the child theme directory you will also need functions.php file with following code inside
add_action("init", "wpjbm_push_dir");
function wpjbm_push_dir() {
global $wpjobboard;
if(is_admin()) {
return;
}
$wpjobboard->getApplication("frontend")->getView()->addDir(get_theme_root()."/jobeleon/wpjobboard/job-board/", true);
$wpjobboard->getApplication("resumes")->getView()->addDir(get_theme_root()."/jobeleon/wpjobboard/resumes/", true);
}
can i check, if we were to edit the style.css files, should it be replace in the theme folder also?
try putting in this folder but doesn’t reflect
wp-content/themes/twentyten/wpjobboard
No, the CSS file does not get replaced as you can put your additional CSS in theme main CSS file. If you do now want to use the default WPJB CSS file you can just unenqueue it.
add_action('wp_enqueue_scripts', 'wpjb_dequeue_style', 30);
function wpjb_dequeue_style() {
wp_dequeue_style( 'wpjb-css' );
wp_deregister_style( 'wpjb-css' );
}
What is the most up to date procedure on creating a child theme for customizing the templates. Step by step and detailed please.
The method described in this article is up to date and compatible with latest WPJB version.
How do I add “Candidate Login” and “Candidate Registration” to my site like you have in the demo?
Make sure that in wp-admin / Settings panel you have “Anyone can register” checkbox checked, then the login/registration links will automatically appear.
How do I hide “Browse Resumes” and “Search Resumes” if I turn on anyone can register?
Our client does not like the work “Categories” they would like that changed to “Industries”. Please let us know how to do this and explain in detail. Thank you.