• Resolved dewinbrush

    (@dewinbrush)


    Hello, I’m using Taxonomy Template to show posts with While instead of queries. I also Using some custom shortcode to bring posts in any pages with Taxonomy slugs

    like

    extract( shortcode_atts( array (
    ‘order’ => ‘DESC’,
    ‘orderby’ => ‘menu_order’,
    ‘TAXOPTFROMSHORTCODE’ =>”,
    ), $atts ) );

    $options = array(
    ‘post_type’ => $type,
    ‘ordered’ => $order,
    ‘orderbyname’ => $orderby,
    ‘TAXONOMYREGNAME’ => $TAXOPTFROMSHORTCODE,

    );

    —–

    [SHORTCODE01 type=”CUSTOMPOST” posts=”1″ orderby=”menu_order” order=”ASC” TAXOPTFROMSHORTCODE=”‘ . $TAXONOMY->slug . ‘]

    ——-

    It’s brings all posts inside category of custom post types as what i ordered with reorder plugin

    At version 1, It was also bringing automatically inside taxonomy instead of shortcodes. But with version 2, It’s not working. I had to add query before while in taxonomy template.

    *******
    $tax = $wp_query->get_queried_object();
    query_posts(array(
    ‘post_type’ => ‘CUSTOMPOSTYPE’,
    ‘orderby’=>’menu_order’,’order’=>’ASC’,
    ‘CPTAXONOMYREGNAME’ => $tax->slug,
    ) );
    ********
    if (have_posts()) : while (have_posts()) : the_post();

    I tested out and v1 is working correctly without any action, v2 not

    also CPT reg is here

    —-cptposttypereg—-

    $args = array(
    ‘menu_icon’ => ‘dashicons-editor-contract’,
    ‘labels’ => $labels,
    ‘description’ => __( ‘Description.’, ‘your-plugin-textdomain’ ),
    ‘public’ => true,
    ‘publicly_queryable’ => true,
    ‘show_ui’ => true,
    ‘show_in_menu’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array(‘slug’ => ‘custompost001′,’with_front’ => false ),
    ‘capability_type’ => ‘post’,
    ‘has_archive’ => false,
    ‘hierarchical’ => false,
    ‘menu_position’ => null,
    /*
    ‘taxonomies’ => array( ‘post_tag’, ‘category’ ),
    ‘exclude_from_search’ => true,
    */
    ‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘comments’, ‘custom-fields’, ‘page-attributes’, ‘revisions’ )
    );
    register_post_type( ‘custompost001’, $args );

    —-taxonomy—-

    $args = array(
    ‘hierarchical’ => false,
    ‘labels’ => $labels,
    ‘show_ui’ => true,
    ‘show_admin_column’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘custompostlist001’ ),
    );
    register_taxonomy( ‘custompostlist001’, array( ‘custompost001’ ), $args );

    ——

    Shortcodes are still working with v2 because of menu_order request, But Taxonomy template ‘while’ not detecting orederd posts of each category

    • This topic was modified 6 years, 5 months ago by dewinbrush.
    • This topic was modified 6 years, 5 months ago by dewinbrush.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    I’m using Taxonomy Template to show posts with While instead of queries.

    sorry, but I don’t understand what it is you are trying to do. I have never used the Taxonomy Template plugin.

    Are you having issues with v2 not showing ordered cpt?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Since I have not heard back from you and several bug fixes were made in recent rleeases, I am assuming this issue now resolved.

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

The topic ‘Taxonomy Sort List’ is closed to new replies.