Is there a way to set the social link options for different categorys
If you mean listing social links then please try this PHP snippet to display social links only in some categories. Please note that it requires further customization. If you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY
add_filter(
'hivepress/v1/models/listing/attributes',
function ($attributes){
$model = explode( '/', current_filter() )[3];
foreach ( hivepress()->social_links->get_links( $model ) as $name => $args ) {
if ( isset( $attributes[$name] ) ) {
$attributes[$name]['categories'] = [ 1, 2, 3 ];
}
}
return $attributes;
},
1000
);
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.