• 03-04-2021, 20:14:54
    #1
    html temayı wordpress e entegre ediyorum. ürün listeleme kısmının altında show more yazısı var. bu yazıya kategori id si ile url vermek istiyorum. bunu nasıl yapabilirim
  • 03-04-2021, 20:24:25
    #2
    O kısmın kodlarını atarsan yardımcı olayım hocam
  • 03-04-2021, 20:32:48
    #3
    function catName($cat_id) { $cat_id = (int) $cat_id; $category = &get_category($cat_id); return $category->name; } function catLink($cat_id) { $category = get_the_category(); $category_link = get_category_link($cat_id); echo $category_link; }
    function catCustom() { $cats = get_the_category($post->ID); $parent = get_category($cats[1]->category_parent); if (is_wp_error($parent)){ $cat = get_category($cats[0]); } else{ $cat = $parent; } echo ''.$cat->name.'';
    }

    Soruyu yanliş anlamadiysam.