Welcome, Guest. Please login or register.

Author Topic: Featured Image intr-o categorie  (Read 790 times)

0 Members and 1 Guest are viewing this topic.

Offline AddyNicu

  • Full Member
  • ***
  • Posts: 269
  • Reputation: +8/-39
  • Gender: Male
    • View Profile
    • FilmeSerialeHD
Featured Image intr-o categorie
« on: March 02, 2016, 01:04:49 AM »
Salut ! Ma puteti ajuta cum sa adaug featured image intr-o categorie ? Am gasit pe net doar plugin-uri si nu vreau, vreau sa fie direct din template. Multumesc, sper ca am fost inteles !
Filme si Seriale Online - FilmeSerialeHD.net

ArenaWeb

Featured Image intr-o categorie
« on: March 02, 2016, 01:04:49 AM »

Offline d_alinus2004

  • Full Member
  • ***
  • Posts: 202
  • Reputation: +20/-4
    • View Profile
Re: Featured Image intr-o categorie
« Reply #1 on: March 02, 2016, 07:14:11 AM »
salut,

Poti incerca acest cod:
Trebuie inserat in template-ul categoriei:

<?php
if ( is_category() )

$thiscat = get_category(get_query_var('cat'),false);

?>

<img class="category-thumb" src="<?php echo bloginfo('url'); ?>/wp-content/uploads/category-images/<?php echo $thiscat->slug ; ?>-50x50.jpg" alt="<?php echo $thiscat->name; ?>" />