does right if I put code on theme file function.php
function my_post_types($types) {
$types[] = ‘job_listing’;
return $types;
}
add_filter(‘s2_post_types’, ‘job_listing’);
Sorry I wrong type
does right if I place code on theme file function.php
function my_post_types($types) {
$types[] = ‘job_listing’;
return $types;
}
add_filter(‘s2_post_types’, ‘job_listing’);
@agi_andnet,
The code would work in theory in the functions.php file of your theme provided that you use the right code – currently your code contains errors.
Bear in mind that if you update your theme you would lose any changes applied in that file and also bear in mind that you almost certainly need to register a custom taxonomy type as weel as the post type. Corrected code is as follows:
function my_post_types($types) {
$types[] = 'job_listing';
return $types;
}
add_filter('s2_post_types', 'my_post_types');
Great many thanks, I correct code and create custom taxonomy with code
function my_taxonomy_types($taxonomies) {
// where ‘my_taxonomy_type’ is the name of your custom taxonomy
$taxonomies[] = ‘job_listing_type’;
return $taxonomies;
}
add_filter(‘s2_taxonomies’, ‘my_taxonomy_types’);
@agi_andnet,
That looks good, it should work now so give it a test.