• Hello, I have this shortcode in shortcode.php now my question is how can I integrate this shortcode into a normal post?

    //Pricing tables
    function hdcs_pricing_table($atts, $content = null) {

    extract(shortcode_atts(array(
    ‘column_type’ => ‘table_one_third’,
    ‘title’ => ”,
    ‘currency’ => ‘$’,
    ‘integer_price’ => 0,
    ‘fractional_price’ => 0,
    ‘is_featured’ => ‘0’,
    ‘list_content’ => ”,
    ‘button_link’ => ‘#’,
    ‘button_text’ => __(‘Read more’, HDCS_THEME_FOLDER_NAME),
    ‘button_type’ => ‘orange’,
    ‘price_description’ => “p/m”,
    ), $atts));

    $atts[‘content’] = $content;
    return HDCSThemeView::draw_html(‘shortcodes/pricing_tables’, $atts);
    }

    add_shortcode(‘pricing_table’, ‘tmk_pricing_table’);

    function hdcs_product($atts, $content = null) {

    extract(shortcode_atts(array(
    ‘title’ => ‘All Products’,
    ‘post_type’ => ‘product’,
    ‘post_status’ => ‘publish’,
    ‘ignore_sticky_posts’ => 1,
    ‘orderby’ => ‘date’,
    ‘column’ => ‘4’,
    ‘order’ => $order,
    ‘products_per_page’=>’12’
    ), $atts));

    return HDCSThemeView::draw_html(‘shortcodes/product’, $atts);
    }

    add_shortcode(‘product’, ‘hdcs_product’);

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to integrate shortcodes into POST’ is closed to new replies.