Skip Navigation

[Closed] Posts under their taxonomy broke

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.

This topic contains 10 replies, has 2 voices.

Last updated by Caridad 7 years, 8 months ago.

Assigned support staff: Caridad.

Author
Posts
#31675

I have a business directory setup that seems to have broken during my last Views upgrade.

I setup a Business Directory View: This View selects Taxonomy of type Business Directory Categories, ordered by Name, ascending.

I also setup a Business Directory Listing View: Business Directory, ordered by post title, ascending – status of publish. It pulls in a view template

I have tried to update the above to show from current page and current cat to no avail. It worked before but now it just shows all listing for every category.

Thank you,
Michael

I can send login info via email if needed.

#31813

Dear Sammut,

We seem to have a bug here, that when you change the type of a view from Archive to Normal, the WordPress Archive settings are still in effect.

What I did was to edit the 'Business Directory Listing View' and change its type to Archive, then I could deselect the taxonomy and change it back to normal. It now works as it should, but I think you need to assign a different Content Template for the taxonomy archive loop.

I will notify the developers of this bug so that its fixed for next version.

Please let me know if there is anything else that I can assist you with.

Regards,
Caridad

#31905

Thank you. I understand what you did. I do have a question(s).

If the 'Business Directory Listing View' is set to normal and all is working, why do I need to change Content Template for the Taxonomy Archive loop (I assume you mean for the business directory?) Is this related to one of my Content Templates not showing? One a user clicks on a category they should go to a page that shows the listings using the "Business Listing List Display". This is not the case the listings are using the "Business Listing Full Page Display" which is alos being used on the single display (this one is correct). I am unsure what I am updating to make the "Business Listing List Display" display, as I have it now it should be?

#31919

Dear Michael,

You can create a Content Template that is used for each of the records in the archive or taxonomy loops. Here is a better explanation:

https://toolset.com/documentation/user-guides/using-view-templates-for-archive-and-taxonomy-pages/

Please let me know if there is anything else that I can assist you with.

Regards,
Caridad

#33565

I added this to the site and nothing shows at all, the listing page is blank.

#33704

Dear Michael,

Can you copy/paste the contents of the Content Template and a screenshot of Views -> Settings? If you can also send me the URL I can see better.

Thanks,
Caridad

#33730

I believe you also have the login for this site, but email me if you need it. Thank you!!!

Screenshot attached.

Links:
Main Category Page: <a href="hidden link">Link to Category Page</a> (Click on Wine or Beauty to go to what should be a listing of businesses. Clicking on a business on the listing page should then go to the full page.)

Content Template: Business Listing List Display

<!-- Biz Listings -->
<div class="biz-listing-grid">
        <div class="photo"><a href="[wpv-post-url]">[wpv-post-featured-image]</a></div>
        <div class="address">
        <h2>[wpv-post-link]         [types field="f2n" state="checked"]<img src='https://cdn.toolset.com/wp-content/uploads/2012/08/farm-to-neighborhood-logoA.jpg'  name='Farm to Neighborhood' alt='Farm to Neighborhood' />[/types] [types field="f2n" state="unchecked"][/types]</h2>
        [types field="street_address_number" format="FIELD_VALUE"][/types]
        [types field="street_address_name" class="" style=""][/types]
        [types field="street_address_type"][/types]
        [types field="address2" class="" style=""][/types]
        [wpv-if cross_streets="wpcf-cross_streets" evaluate="$cross_streets != '' "]
        <br/>
        Cross Streets: [types field="cross_streets" class="" style=""][/types]
        [/wpv-if]

        [wpv-if contact_phone="wpcf-contact_phone" evaluate="$contact_phone != '' "]
        <br/>
        Phone: [types field="contact_phone"][/types]
        [/wpv-if]

        [wpv-if website="wpcf-website" evaluate="$website != '' "]
        <br/>
        [types field="website" title="WEBSITE"][/types]
        [/wpv-if]
        </div>
        <div class="hours">
            Sun: [types field="sunday" class="" style=""][/types]<br />
            Mon: [types field="monday" class="" style=""][/types]<br />
            Tues: [types field="tuesday" class="" style=""][/types]<br />
            Wed: [types field="wednesday" class="" style=""][/types]<br />
            Thurs: [types field="thursday" class="" style=""][/types]<br />
            Fri: [types field="friday" class="" style=""][/types]<br />
            Sat: [types field="saturday" class="" style=""][/types]<br />
        </div>
        <div class="clear" style="height:15px;"></div>

        <div class="info">
         <div class="holder">-</div>
        <div class="directions">
            <strong>Directions:</strong><br />
        <a target ="_blank" href="<em><u>hidden link</u></em> field="street_address_number" format="FIELD_VALUE"][/types]+[types field="street_address_name" class="" style=""][/types]+[types field="street_address_type"][/types]+[types field="city" class="" style=""][/types]+[types field="zip" class="" style=""][/types]"><img src='https://cdn.toolset.com/wp-content/uploads/2012/08/mapIcon.png' name='Google Map' alt='Google Map' /></a>
      
        <a href='<em><u>hidden link</u></em> [types field="street_address_number" format="FIELD_VALUE"][/types]+ [types field="street_address_name" class="" style=""][/types]+ [types field="street_address_type"][/types],+[types field="city" class="" style=""][/types],+NY+[types field="zip" class="" style=""][/types]&city2=newyork'><img src='https://cdn.toolset.com/wp-content/uploads/2012/11/HopStop.jpg' name="HopStop' alt='HopStop' width='24' height='24' /></a>
        <a href='<em><u>hidden link</u></em> src='https://cdn.toolset.com/wp-content/uploads/2012/11/RideTheCity.jpg' name="Ride the City' alt='Ride the City' width='24' height='24' /></a>
        </div>
        <div class="payments">
            [wpv-if delivery="wpcf-delivery" evaluate="$delivery != '' "]
            <strong>Delivery:</strong> [types field="delivery" option="wpcf-fields-radio-option-640951035"]Yes[/types] [types field="delivery" option="wpcf-fields-radio-option-175122320"]No[/types] <br />
            [/wpv-if]
            <strong>Payments Accepted:</strong><br />
            [types field="payment_type" option="wpcf-fields-radio-option-369266777"]Credit cards accepted[/types] [types field="payment_type" option="wpcf-fields-radio-option-489995674"]Cash only[/types]
            [types field="credit-cards" option="0" state="checked"]Visa[/types] [types field="credit-cards" option="0" state="unchecked"][/types] [types field="credit-cards" option="1" state="checked"]Master Card[/types] [types field="credit-cards" option="1" state="unchecked"][/types] [types field="credit-cards" option="2" state="checked"]American Express[/types] [types field="credit-cards" option="2" state="unchecked"][/types] [types field="credit-cards" option="3" state="checked"]Discover[/types] [types field="credit-cards" option="3" state="unchecked"][/types]
        </div>
        <div class="order">

                <strong>Order Online!</strong><br />
                [types field="seamless_web" title="<img src='https://cdn.toolset.com/wp-content/uploads/2012/09/seamless1.jpg' alt='Seemless' title='Seemless'  />"][/types]
                [types field="grubhub_web" title="<img src='https://cdn.toolset.com/wp-content/uploads/2012/09/grub-hub1.png' alt='Grub Hub' title='Grub Hub'  />"][/types]

        </div>
        </div>

</div>
<div style="border-top:1px solid #333;margin-bottom:24px;"></div>

When I followed the instructions here <a href="https://toolset.com/documentation/user-guides/using-view-templates-for-archive-and-taxonomy-pages/">https://toolset.com/documentation/user-guides/using-view-templates-for-archive-and-taxonomy-pages/</a&gt; I was required to make an archive view. I did this using the code above

#33773

Dear Michael,

You are trying to do the same thing in two ways at the same time:

1) With an WordPress Archive
2) With a Content Template assigned to the loop

For some reason, the archive view is not working with genesis. But disabling that, the Content Template assigned to the loop works fine.

Please let me know if there is anything else that I can assist you with.

Regards,
Caridad

#34247

Thank you! The site does no use Genesis. I can see it working, however now the listing are not in alphabetical order.

It is odd, prior the lat version his was working fine.

#34249

Oops, meant to say "It is odd, prior tot he last version it was all working fine" . Sorting in alpha is critical.

#34402

Dear Michael,

The query for an WordPress Archive is already defined by WordPress. Using the plugins, the only alternative we have is to disable the archive altogether and create a page with a Normal View. In here you can have any sorting you want.

Another option is to change the order of the archive by using some code:

add_action('pre_get_posts', 'order_archive_by_title');
function order_archive_by_title($q) {
 if (!is_admin() && is_archive() && is_main_query()) {
   $q->set('orderby', 'post_title');
   $q->set('order', 'ASC');
 }
}

Please let me know if there is anything else that I can assist you with.

Regards,
Caridad

The topic ‘[Closed] Posts under their taxonomy broke’ is closed to new replies.