Home › Forums › Other › Enable a Custom field in a plugin to render a shortcode or make it editable?
- This topic is empty.
-
AuthorPosts
-
December 3, 2015 at 7:30 am #235565
Crssp
ParticipantI 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=1299756Thanks, Crssp.
December 3, 2015 at 8:05 am #235566Crssp
ParticipantI 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,
crsspDecember 3, 2015 at 10:49 am #235571Crssp
ParticipantThe 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 directlyglobal $product;
?><?php
if( ! empty( $term_description ) ){
echo $term_description;
}
?>…
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.