Thread Starter
dapidu
(@dapidu)
May be I got an idea.
If I don’t use Show All, it can work (i just have to create a general group to put all the site in, but I don’t have to use the ‘show all’ group by default because of multiple same site.
In line 3535 in the wp-portfolio.php, i got :
if (!$isWidgetTemplate && $show_filter_buttons) {
$filter_buttons_block = ‘<div class=”button-group filters-button-group”>
<button class=”button ‘ . (!in_array($defaultFilter, array_keys($groups)) ? ‘is-checked’ : ”) . ‘” data-filter=”*”>’ . __(‘Show all’, ‘wp-portfolio’) . ‘</button>’;
foreach ($groups as $group_id => $group_name) {
$filter_buttons_block .= ‘<button class=”button ‘ . ($defaultFilter == $group_id ? ‘is-checked’ : ”) . ‘” data-filter=”.group-‘ . $group_id . ‘”>’ . $group_name . ‘</button>’;
}
$filter_buttons_block .= ‘</div>’;
$content = WPPortfolio_replaceString(‘%FILTER_BUTTONS_BLOCK%’, $filter_buttons_block, $content);
}
How Can I modify to put an other group by default ? (and not the ‘Show all’ one)
Thanks in advance
Hello,
This should be possible by specifying only the groups you want shown on the front-end. Have you tried using the WP-Portfolio shortcode generator or looking in the documentation for all of the various customizations? I would think there is already a way to do what you want.
If you still have trouble, please let me know what steps you took and we’ll dig in to give some suggestions or extend the functionality, if necessary.
Thank you,
Brandon