lalalalalelele
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: See taxonomy with shortcodeYes, exactly
ThanksForum: Fixing WordPress
In reply to: See taxonomy with shortcodeHello,
What I want is to see any taxonomy, to put another different and see it.Forum: Fixing WordPress
In reply to: See taxonomy with shortcodeYes, now Im trying this
function shortcode_Paramet( $atts ) { extract( shortcode_atts ( array( 'style' => 'list', 'taxonomy' => 'product_categories', ),$atts)); echo get_the_category_list($atts); }
Forum: Fixing WordPress
In reply to: See taxonomy with shortcodeHello.
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 shorcodeIn 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);
- This reply was modified 7 years, 8 months ago by lalalalalelele.
- This reply was modified 7 years, 8 months ago by lalalalalelele.
Forum: Fixing WordPress
In reply to: Help with shorcodeIn 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);