Forum Replies Created

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

    (@joshuadrobayna)

    OK, problem resolved.

    Thread Starter joshuadrobayna

    (@joshuadrobayna)

    Al final lo he resuelto

    
    
    				<?php 
    					$brands = wp_get_post_terms(get_the_ID(), 'pwb-brand' );
    					$product_brands = wp_get_object_terms($post->ID, 'pwb-brand');
    
     							$slug = 'brand'; //default
    
     								if ( ! empty( $product_brands ) ) {
    								 if ( ! is_wp_error( $product_brands ) ) {
    										 foreach( $product_brands as $brand ) {
    			 							$slug = $brand->slug;
    		 																	  }
    																	 	 }
    																}
    
    					foreach($brands as $brand){
        				echo '<div class="tag-brands" style="color: #fe7418 !important;font-weight: 900;font-size: 15px;"><a href="'. $slug .'">' . $brand->name . '</a></div>';
    					} 
    				?>
    Thread Starter joshuadrobayna

    (@joshuadrobayna)

    Array
    (
    [version] => 3.2.1
    [wp_version] => 4.8.2
    [wp_multisite] =>
    [wp_memory_limit] => 192M
    [wp_debug_mode] =>
    [wp_cron] => 1
    [language] => es_ES
    [server_info] => Apache
    [php_version] => 7.0.22
    [php_post_max_size] => 30M
    [php_max_execution_time] => 60
    [php_max_input_vars] => 3000
    [max_upload_size] => 31457280
    [default_timezone] => UTC
    [theme] => Array
    (
    [name] => EstoreWoo
    [version] => 1.0.1
    [parent_theme] =>
    )

    [active_plugins] => Array
    (
    [0] => redux-framework/redux-framework.php
    [1] => asesor-cookies-para-la-ley-en-espana/plugin.php
    [2] => contact-form-7/wp-contact-form-7.php
    [3] => custom-css-js/custom-css-js.php
    [4] => custom-twitter-feeds/custom-twitter-feed.php
    [5] => essential-grid/essential-grid.php
    [6] => instagram-feed/instagram-feed.php
    [7] => js_composer/js_composer.php
    [8] => loco-translate/loco.php
    [9] => mailchimp-for-wp/mailchimp-for-wp.php
    [10] => maintenance/maintenance.php
    [11] => mega_main_menu/mega_main_menu.php
    [12] => perfect-woocommerce-brands/main.php
    [13] => really-simple-ssl/rlrsssl-really-simple-ssl.php
    [14] => revslider/revslider.php
    [15] => roadthemes-helper/roadthemes-helper.php
    [16] => svg-support/svg-support.php
    [17] => templatera/templatera.php
    [18] => user-role-editor/user-role-editor.php
    [19] => woocommerce-custom-product-tabs-lite/woocommerce-custom-product-tabs-lite.php
    [20] => woocommerce-customizer/woocommerce-customizer.php
    [21] => woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
    [22] => woocommerce-predictive-search/wc-predictive-search.php
    [23] => woocommerce-role-based-price/woocommerce-role-based-price.php
    [24] => woocommerce/woocommerce.php
    [25] => wp-php-console/wp-php-console.php
    [26] => yith-live-chat/init.php
    [27] => yith-woocommerce-badge-management-premium/init.php
    [28] => yith-woocommerce-wishlist/init.php
    )

    [pwb_options] => Array
    (
    [wc_pwb_admin_tab_brand_single_position] => after_add_to_cart
    [old_wc_pwb_admin_tab_slug] => brands
    [wc_pwb_notice_plugin_review] =>
    [wc_pwb_admin_tab_slug] => brands
    [wc_pwb_admin_tab_brand_desc] => yes
    [wc_pwb_admin_tab_brands_in_loop] => brand_link
    [wc_pwb_admin_tab_brands_in_single] => brand_link
    [wc_pwb_admin_tab_brand_logo_size] => thumbnail
    )

    )

    Thread Starter joshuadrobayna

    (@joshuadrobayna)

Viewing 4 replies - 1 through 4 (of 4 total)