Hi kaitlynjanine!
I’m really sorry for the delayed response, I hope you still find this useful.
You don’t necessarily have to override a function. This plugin works with a complete template system that you can make use of. Let’s suppose you added a new field doing something like this:
add_filter( 'nice_portfolio_metabox_info_fields', 'my_portfolio_metabox_info_fields' );
function my_portfolio_metabox_info_fields( $fields ) {
$fields[] = array(
'type' => 'text',
'label' => esc_html__( 'My Awesome Field', 'my-textdomain' ),
'name' => '_project_awesome_field',
'desc' => esc_html__( 'My awesome field description', 'my-textdomain' ),
);
return $fields;
}
In this example, the _project_awesome_field
key will be the internal identifier for the new field once the data is saved. So we can retrieve and print the value using get_post_meta()
like this:
<?php echo get_post_meta( get_the_ID(), '_project_awesome_field', true ); ?>
The best place to include something like this is inside a custom template. The plugin includes a lot of templates that can you can override from your theme to include this kind of implementations. You can take a look at the templates
folder inside the plugin to choose the one that better suits your needs, and then create a new template in your theme to override that one. Inside each template file you’ll find the path where you need to put your custom template.
You can even create a completely new template inside your theme and call it where you need it by using the nice_portfolio_get_template()
function. There’s a lot of examples on how to use this function inside the public/template-loaders.php
file.
Sorry again for the time it took to answer your question. Please let us know if we can be of any help with this issue.
Best,
Andrés.