Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter velphia

    (@velphia)

    Hello,

    I’m still looking. I tried to put as code below while($products->have_posts()): $products->the_post(); :
    $product_desc = get_post_meta(get_the_id(),'product_desc', true);

    then to display the description:
    echo '<p class = "descript">'. $ product_desc. '</ p> ';
    but nothing appears ??

    Thread Starter velphia

    (@velphia)

    No one to help me ? ??

    Thread Starter velphia

    (@velphia)

    Bon un développeur m’a aidé, aussi je poste la solution quand même, cela servira sans doute à quelqu’un… (mais je poste en fran?ais na !!)
    Dans le fichier wpc-catalogue.php, environ ligne 170 :

    <div id="wpc-products">';
                    while($products->have_posts()): $products->the_post();
                        $title = get_the_title();
                        $permalink = get_permalink();

    ajouter ; $product_desc = get_the_content();

    puis ensuite vers la ligne 329 trouvez le code echo '<h2 class="wpc-title">' . $title . '</h2>'; et ajouter echo '<p class="descript"> '. $product_desc .' </p>';

    et si vous souhaitez couper le texte pour ne pas l’avoir en entier je vous propose d’ajouter avant le dernier code `$content_max_length = 90;
    if ($content_max_length < strlen($product_desc)) {
    $product_desc = substr($product_desc, 0, $content_max_length) . ‘…’;
    }` le 90 étant le nombre de caractère.

    Voilà en espérant que ?a aide !

    Plugin Author Maeve Lander

    (@enigmaweb)

    Thanks for sharing your solution @velphia. Hopefully this will help someone else if they wish to achieve something similarly custom.

    Sorry I was not available to help you – I was away travelling and also this kind of advanced customisation is outside of scope of support for this plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product description in category’ is closed to new replies.