Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Can you post the code you are currently using?

    ~ Steven

    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);

    As per the Forum Welcome, please post code & markup between backticks or use the code button. Your posted code now seems to have been damaged by the forum’s parser.

    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);
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help with shorcode’ is closed to new replies.