0
what would be the best way to catch the thumbnails of the categories ?
function get_listaCatPort($atts) {
echo '<ul class="section section-filters">';
$atts = array(
'taxonomy' => 'portfolio-types',
'orderby' => 'name',
'order' => 'ASC',
'show_count' => 0,
'hierarchical' => 1,
'hide_empty' => 1,
'title_li' => '',
'depth' => 1,
'walker' => new New_Walker_Category(),
'current_category' => get_queried_object()->term_id,
);
wp_list_categories($atts);
echo '</ul>';
}
add_shortcode('listaCatPortfolio', 'get_listaCatPort');
Ummmm guy really, had used this plugin in the past in another situation, it really makes sense what you said, I’ll try here. Thanks for the tip there brother!!!
– Aquiles Maior
Beauty! In my case there, I display in the theme a listing of the categories I have.
– Brício Fernandes
Brício, don’t just see if I’m on the right track, please: 1º - create a field of the Type Image 2ª - Localization, create the Rules that would be like "Taxonomy = Category of Porfolios" ?
– Aquiles Maior
He gave right here brother, Thanks a lot for the tips. ;)
– Aquiles Maior
Show man, that good! Note that you can still discard some variables if you want to make the code cleaner.
– Brício Fernandes
yes, I saw this very, very good. This plugin of infinite possibilities, I’m already using for another idea here hehehe.
– Aquiles Maior
face, I noticed something. When I use: $image = get_field('capa_cat', 'category_' .$tag->term_id); works beautiful, but if I click edit page, it gets loading until lock. Did I forget something, or doing wrong ?
– Aquiles Maior
Edit page in your wordpress admin?
– Brício Fernandes
This, like on the page or post that I add this shortcode that I created, if I try to edit it it keeps loading until it gives error 502 or 505, there I tested. So, then I go there in my functions.php file and I comment on this line of $image in my shortcode, then it doesn’t lock anymore, but I don’t list my kkk images
– Aquiles Maior
Right! Dude, this code that I passed you you add in the theme itself, in the exact location you want to display, nothing should be inserted in functions.php
– Brício Fernandes
ah ok I’ll do it then, Thank you!!!
– Aquiles Maior
Brother, just one more question. I’m trying not to show some categories, but I think I’m using the wrong 'category__not_in' => array( '12', '13') .
– Aquiles Maior
Try using exclude=> '12', '13' .... or else 'exclude' => array( '12', '13'). I can’t remember if it’s one or the other.
– Brício Fernandes