Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Enable a Custom field in a plugin to render a shortcode or make it editable?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #235565
    Crssp
    Participant

    I would like to turn WooCommerce plugin ‘Brands description’ field into either an WP editor or even SiteOrigin page builder region… or at the least have it to render a shortcode?

    The plugin is https://wordpress.org/plugins/yith-woocommerce-brands-add-on/

    When entering a brand, much like categories, but there is a description field in the backend… below is the code creating this field, this is the standard field, included with the YITH Brands plugin.
    It’s an excellent plugin and does a nice job of rendering the Woocommerce products in the brands categories.

    <div class="form-field term-description-wrap">
    <label for="tag-description">Description</label>
    <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
    <p>The description is not prominent by default; however, some themes may show it.</p>
    </div>

    Having this field become a fully editable area would be nice, or at the very least have it render a shortcode.
    Keeping it simple is probably best, but no use stopping at just rendering a shortcode though either.

    Screenshot for the edit Brands taxonomy entry page:
    https://s.w.org/plugins/yith-woocommerce-brands-add-on/screenshot-4.png?r=1299756

    Thanks, Crssp.

    #235566
    Crssp
    Participant

    I guess after thinking about it maybe it would be easier to just worry about creating brand Pages, and being able to pull in the Brand Products to that page, makes much more sense, as I think about it now.

    thanks,
    crssp

    #235571
    Crssp
    Participant

    The entirety of the Yith Woocommerce Brands archive template looks like this. It renders all the products of the brand.
    Anyone have any ideas on extending this then, concepts/codes would be greatly appreciated.


    <?php
    /*
    * This file belongs to the YIT Framework.
    *
    * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
    * that is bundled with this package in the file LICENSE.txt.
    * It is also available through the world-wide-web at this URL:
    * http://www.gnu.org/licenses/gpl-3.0.txt
    */

    if ( ! defined( ‘YITH_WCBR’ ) ) {
    exit;
    } // Exit if accessed directly

    global $product;
    ?>

    <?php
    if( ! empty( $term_description ) ){
    echo $term_description;
    }
    ?>

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.