Skip Navigation

[Resolved] Plugins

This thread is resolved. Here is a description of the problem and solution.

Problem:

Setup order of outputs from shortcode [wpv-post-taxonomy]

Solution:

You can follow our document to setup the order parameter.

For example:

[wpv-post-taxonomy type="argomento" order="asc"]

[wpv-post-taxonomy type="argomento" order="desc"]

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/views-shortcodes/#vf-153472

This support ticket is created 4 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 3 voices.

Last updated by MarcoS3712 4 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1626951

Hello, only a simple question...
for new sites I don't have to download Toolset Views and layout, is it correct? These are for old sites, true?

I'm trying to connect a custom post type (Topic) with an other (subtopic), and show them in frontend.

I've read documents, but often referes to views and layout, as in:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-related-child-posts/

Which is the simple way to set it in correct way? Do you have UPDATED documentation?
Which shortcode I have to set in order to open subtopics when i click on a topic image?

I'm in a hurry to set the first features!!!!

Thanks.

Marco.

#1628445

Hi Marco,

Thank you for contacting us and I'd be happy to assist.

Your understanding is correct and the Toolset Views and Layouts plugins are not needed on newer websites.

The new Blocks based views editor can be used to show the list of posts based on set criteria, for example, if you need to show the "Subtopics" related to a "Topic" on a single "Topic" post page.
( ref: https://toolset.com/documentation/getting-started-with-toolset/filter-content-lists-and-add-custom-search/ )

However, it can't be used for nested post lists, i.e. where the parent (Topics) and child (Subtopics), both need to be displayed, based on the relationship.

For nested lists, you'll need to use the classic views editor, as shown in the guide that you referred to and in this one:
https://toolset.com/documentation/user-guides/views/using-a-child-view-in-a-taxonomy-view-layout/

Note: For the steps which mention "Views only", you don't have to install the Views plugin separately. You can simply enable the classic views editor, using the "Editing experience" option at WP Admin -> Settings -> General.
( you'll select the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build" as shown in this screenshot hidden link )

In summary, you'll need two views built using the classic views editor:

1. A parent post view that shows the "Topics" posts.

2. A child post view will be nested inside the parent view and will show the "Subtopics" posts related to the current "Topic" post in the parent view's loop.

I hope this helps and please let me know if you any point or step is not clear.

regards,
Waqar

#1628793

Thanks al lot for your answer Waqar!
I'm trying to do what you suggest. I let you know about it. 🙂

Marco

#1628827

You're very welcome Marco.

Please let me know how it goes and if you have any follow-up questions.

For a new question/concern, you're welcome to start a new ticket.

#1634939
Arguments.png

Hello Waqar,
I would like to organize a post archive. For each post will be selected a topic form a custom taxonomy.
Before arrive in an WordPress Archive I’ve created a page with the first view (nested).

Listing Top-level Arguments

Taxonomy - Arguments

Filter: select taxonomy terms parent: None.

Cycle (Ordered list ):

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<ol class="wpv-loop js-wpv-loop">
<ol type="A">
<wpv-loop>

  • [wpv-post-body view_template="loop-item-in-listing-top-level-arguments"]
  • [wpv-view name="listing-sub-arguments" cached="off"]
    </wpv-loop>
    </ol>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
    [wpml-string context="wpv-views"][/wpml-string]
    [/wpv-no-items-found]
    [wpv-layout-end]

    Listing Sub-Arguments

    Taxonomy - Arguments

    Filter: select taxonomy terms parent: parent view

    Cycle (Bootstrap grid [4]):

    [wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
    <div class="container wpv-loop js-wpv-loop">
    <wpv-loop wrap="1" pad="true">
    [wpv-item index=1]
    <div class="row ">
    <div class="col-md-12">[wpv-post-body view_template="loop-item-in-listing-sub-arguments"]</div>
    [wpv-view name="post-taxonomy-group" cached="off"]
    </div>
    [wpv-item index=other]
    <div class="col-md-12">[wpv-post-body view_template="loop-item-in-listing-sub-arguments"]</div>
    [wpv-item index=pad]
    <div class="col-md-12"></div>
    [wpv-item index=pad-last]
    <div class="col-md-12"></div>
    </wpv-loop>
    </div>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
    [wpml-string context="wpv-views"][/wpml-string]
    [/wpv-no-items-found]
    [wpv-layout-end]

    Post Taxonomy Group

    Post Types Articles

    Filter: Topics are: Set from the parent taxonomy view

    Cycle (Ordered list ):

    [wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
    <ol class="wpv-loop js-wpv-loop">
    <wpv-loop>

  • <a>[wpv-post-body view_template="loop-item-in-post-taxonomy-group"]
  • </wpv-loop>
    </ol>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
    [wpml-string context="wpv-views"][/wpml-string]
    [/wpv-no-items-found]
    [wpv-layout-end]

    Final output I would to have is in the image attached.

    But, if I have to posts with same topic I don't want have more than one topic.
    So, I tried to insert into the View's Loop Output editor JS panel:

    jQuery(document).ready(function(){
    var strs = [];
    var dupes = [];
    jQuery('.wpv-loop').find('li > a').each(function(index,item){
    var txt = jQuery(item).text(); if( strs.indexOf(txt) > -1 ) {
    dupes.push(index);
    } else{
    strs.push(txt);
    }
    });
    dupes.reverse();
    for(var i=0; i<dupes.length; i++) {
    jQuery('.wpv-loop').find('li').eq(dupes[i]).remove();
    }
    });

    What I have to update?

    Thanks!!!! 🙂

    Marco

    #1637131

    Hello,

    Waqas is on vacatin, I will take care this ticket.

    For the new JS questions, this is a custom codes problem, if you need more assistance for it, please provide a test site with the same problem, also point out the problem page URL and view URL, I need to test it in a live website. thanks

    #1638215

    According to our support policy, we don't provide custom codes support:
    https://toolset.com/toolset-support-policy/

    And we can handle the questions one by one.

    For the question:

    In this case I would like to order custom taxonomies

    Please elaborate the question with more details:
    What kind of order do you want?

    I have checked it in your website, the post view:
    hidden link
    In section "Loop item in Post Taxonomy Group", you are using below shortcode:
    [wpv-post-taxonomy type="argomento"]
    This is a Toolset built-in shortcode, you can follow our document to setup the order parameter:
    https://toolset.com/documentation/user-guides/views/views-shortcodes/#vf-153472

    For example:
    [wpv-post-taxonomy type="argomento" order="asc"]
    [wpv-post-taxonomy type="argomento" order="desc"]

    #1640025

    Ok, thanks.

    #1640045

    My issue is resolved now. Thank you!