Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter lalalalalelele

    (@lalalalalelele)

    Yes, exactly
    Thanks

    Thread Starter lalalalalelele

    (@lalalalalelele)

    Hello,
    What I want is to see any taxonomy, to put another different and see it.

    Thread Starter lalalalalelele

    (@lalalalalelele)

    Yes, now Im trying this

    function shortcode_Paramet( $atts ) {
    	extract( shortcode_atts ( array(	
    		'style'     => 'list',
    	    'taxonomy'  => 'product_categories',
    	),$atts));
    
    	echo get_the_category_list($atts);
    }
    Thread Starter lalalalalelele

    (@lalalalalelele)

    Hello.
    Yes, it can be, but I want it later put in a plugin for later to be able to take any taxonomy.

    Forum: Fixing WordPress
    In reply to: Help with shorcode
    Thread Starter lalalalalelele

    (@lalalalalelele)

    In functions.php

    
    function shortcode_Paramet( $atts ) {
        extract( shortcode_atts( array(
            'titulo'=> 'Products',
            'taxonomy' => 'product',
            'number' => '2'
        ), $atts ) );
     
        $out='<div>
    		<div>
    			<ul>
    				<li>Título:'.$titulo.'</li>
    				<li>Taxonomía:'.$taxonomy.'</li>
    				<li>Number:'.$number.'</li>
    			</ul>
    		</div>
    	</div>';
     
        return $out;
    }
    
    add_shortcode( 'details', 'shortcode_Paramet' );
    
    // Taxonomy
    function crear_taxonomia() {
       register_taxonomy('product', 'post', array( 'hierarchical' => false, 'label' => 'Product',    'query_var' => true, 'rewrite' => true));
    }
    
    add_action('init', 'crear_taxonomia', 0);
    
    Forum: Fixing WordPress
    In reply to: Help with shorcode
    Thread Starter lalalalalelele

    (@lalalalalelele)

    In functions.php

    function shortcode_Paramet( $atts ) {
    extract( shortcode_atts( array(
    ‘taxonomy’ => ‘products’
    ), $atts ) );

    $salida='<div>
    <div>
    <p><span>Taxonomy</span></p>

    • Taxonomía: ‘.$taxonomy.’

    </div>
    </div>’;

    return $salida;
    }

    add_shortcode( ‘shortcode_Param’, ‘shortcode_Paramet’ );

    // Taxonomy
    function crear_taxonomia() {
    register_taxonomy(‘products’, ‘post’, array( ‘hierarchical’ => false, ‘label’ => ‘Products’, ‘query_var’ => true, ‘rewrite’ => true));
    }

    add_action(‘init’, ‘crear_taxonomia’, 0);

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