Skip Navigation

[Resolved] Potential issue with your classified site demonstration via WP-Discover

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Caridad 11 years, 3 months ago.

Assisted by: Caridad.

Author
Posts
#35706
yogatest.jpg
featuredad-actual.jpg
featuredadnew.png

Dear support (and community)

I set up an account on your test sandbox website WP-Discover. My goal was to create a test classified advert website based on your example and then tweak it. However, I noticed that there appears to be an error in one of the setup steps that prevents the example site operating as expected.

The problem is in the "Featured Ad Listing" as you can see on my test site here:
hidden link

I was following the instructions here:
hidden link

The first step was to add the custom CSS to the theme, which I did here:
hidden link

The next step was to "Create the Featured Bar" and that's where a couple of things from the documentation did not match to tools.

For example, when adding a filter term, you had a custom filter which asked up to set the "Value/s to compare" to 1. As you can see by the featuredad-actual image, it appears that we have to choose "constant" rather than value to compare, as the latter option does not exist.

More importantly, and the bug I can't quite resolve on my own, is that the conditional shortcode to display posts that have gold or silver membership does not appear to work. In the View Layout I selected to "View/Edit Meta HTML" as instructed. You had some code that appeared to need copy/pasting into that section, as the pre-existing code did not match your instructions.

The code on the site was:
==
[wpv-layout-start]
[wpv-posts-found]
<!-- wpv-loop-start -->
<table width="100%">
<wpv-loop wrap="5" pad="true">
[wpv-item index=1]
<tr><td></td>
[wpv-item index=other]
<td></td>
[wpv-item index=5]
<td></td></tr>
[wpv-item index=pad]
<td></td>
[wpv-item index=pad-last]
<td></td></tr>
</wpv-loop>
</table>
<!-- wpv-loop-end -->
[/wpv-posts-found]
[wpv-no-posts-found][wpml-string context="wpv-views"]No posts found[/wpml-string][/wpv-no-posts-found]
[wpv-layout-end]
==

The code you listed was:
==
[wpv-layout-start]
<!-- wpv-loop-start -->
<div id="classified_featured_ads">
<table width="100%">
<wpv-loop wrap="5" pad="true">
[wpv-item index=1]
<tr><td><div class="classified_featured_wrapper [wpv-if level="wpcf-featured_level" evaluate="$level = 'silver'"]silver[/wpv-if][wpv-if level="wpcf-featured_level" evaluate="$level = 'gold'"]gold[/wpv-if]">[wpv-post-featured-image]<div class="classified_featured_title">[wpv-post-link]</div></div></td>
[wpv-item index=other]
<td><div class="classified_featured_wrapper [wpv-if level="wpcf-featured_level" evaluate="$level = 'silver'"]silver[/wpv-if][wpv-if level="wpcf-featured_level" evaluate="$level = 'gold'"]gold[/wpv-if]">[wpv-post-featured-image]<div class="classified_featured_title">[wpv-post-link]</div></div></td>
[wpv-item index=5]
<td><div class="classified_featured_wrapper [wpv-if level="wpcf-featured_level" evaluate="$level = 'silver'"]silver[/wpv-if][wpv-if level="wpcf-featured_level" evaluate="$level = 'gold'"]gold[/wpv-if]">[wpv-post-featured-image]<div class="classified_featured_title">[wpv-post-link]</div></div></td></tr>
</wpv-loop>
</table>
</div>

<!-- wpv-loop-end -->
[wpv-no-posts-found][wpml-string context="wpv-views"]No posts found[/wpml-string][/wpv-no-posts-found]
[wpv-layout-end]
==

Your code lacked the [wpv-posts-found] tag, though I am not sure if that is important. What is important is that the end result is that posts tagged silver or gold do not appear highlighted as expected. See the "yogatest" image as an example of this problem in action. It is displaying correctly in terms of being a featured advert on hidden link but (a) there is no silver border and (b) all of the classified adverts have their text out of alignment with the images unless I remove the "<div id="classified_featured_ads">" from your VIEWS code.

Please help. I really appreciate your tool and I want to learn how to use it properly before committing to deployment. It's possible I am just making a silly mistake, but on the other hand I am a little concerned that the walk-through test code did not work as expected. It should be noted that the issues highlighted above were the only issues encountered with the classified ad example site. The rest of the walk through worked fine in terms of setup.

Shane

#35746

Dear Shane,

1) i believe this is correct, just different wording. Constant means that the value to compare will be the same all the time, and assigned by you beforehand.

2) Wrapping with [wpv-posts-found] tag is a new addition to the plugin and should work either way.

3) I see that the class silver or gold is not added. I will look into this and get back to you. And the alignment, remove width:150px from the #classified_featured_ads .classified_featured_title class.

Thanks for your time reporting these issues. I will send a note about all these to the documentation team, and get back to you about the silver/gold conditional tag shortly.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#35749

Caridad, your answer was fantastic. Clear, concise and helpful.

If you could get back to me about the broken issues with the silver/gold conditional tag I would really appreciate it. It's strange that it's not working, and I would love to know what went wrong. That sort of feature could be quite useful on an active site.

Shane

#35938
enterfieldslug.jpg

Dear Shane,

Below is feedback I received from one of our developers. Please note that we have also scheduled a review of the documentation to avoid future issues like this:

It seems there is no bug issue involved. The problem is that the user incorrectly assigns a slug name to the Featured Level that corresponds to the one used by the Views conditional shortcode parameter. After I logged-in; I noticed that the slug name used is: enter-field-slug (See enterfieldslug.jpg screenshot) for Featured Level.
The resulting field name for that setup will be wpcf-enter-field-slug while the one used by our documentation example as well as our code is wpcf-featured_level.

Therefore the silver and gold are not properly rendered by the Views conditional output due to this mismatch. I revised the configuration of the custom fields to use the proper slug name “featured_level?? and then refreshing/updating the posts.

It is now working normally here: hidden link

I’ve assigned gold level to “We make nice food too!?? post while the rest of the featured ads are silver.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#35957

Thank you so much for solving this. I was really puzzled. Perhaps a small update to the documentation would be useful to prevent this happening again. At the top, when using Types to create the Custom Fields, it just says:
"Before we get started, please use the Types plugin to create the following Custom Fields:

Featured Ad – checkbox field (value to store set to “1″)
Featured Level – textfield field
Make sure that you have set a static front page under Reading > Settings."

By adding a line to ensure that the field slugs are set to "featured_ad" and "featured_level" it should help make everything work as expected for new users.

Thank you again!

Shane

#35962

Dear Shane,

We will review the documentation in this area.

Thank you,
Caridad

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.