Skip Navigation

[Resolved] How to make content appear in loop depending on date and time – part 2

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 7 years, 5 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by CommMgr 7 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#540159

Hi, Shane...

For some reason my original thread was marked as resolved when it was not. And I am unable to change it back to "still need assistance". It would be more efficient to continue with the original thread. However, if that is not possible, I will repost my last reply here.

Here is a link to the original thread:
https://toolset.com/forums/topic/how-to-make-content-appear-in-loop-depending-on-date-and-time/

In that thread, I stated "I need to learn what conditional code to use so that a session will appear in the list according to its day/time."

in your reply you mentioned:

"This would be possible but you will need to setup multiple views for this. For e.g you will need to create a view for each of the days. then filter that view to only lists the posts for that day.

Then you will need to order the display by the time custom field..."

Could you please give me the exact code for that "filter"...with detailed instructions on where to put it in my functions.php file?

Also, what conditional code do I need to add to my existing code (posted below) to make that filter work? (this is the code I shared in the original post) As a reminder, I am still learning conditional coding so I need to know exactly where to put the code.

I can probably figure out how to order the display by the time custom field.

Thanks for your assistance.
CommMgr

[wpv-post-body view_template="conference template"][wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
     
<table style="background-color: #efefef;" width="100%" cellspacing="0" cellpadding="0" border="0">
        <tbody class="wpv-loop js-wpv-loop">
            <wpv-loop>
<tr>
<td style="padding: 10px 0 10px 10px; border-top: none; border-bottom: thin solid #bfbfbf; font-size: 14px; line-height: 1.4em;">
<div style="font-weight: 600;">[wpv-conditional if="( $(wpcf-sold-out) ne '' )"][types field='sold-out' state='checked']<img src="<em><u>hidden link</u></em>" alt="SOLD OUT" width="90" height="16">[/types][types field='sold-out' state='unchecked'][/types]&nbsp; [/wpv-conditional]<a href="[wpv-post-url]">[types field='session-number'][/types] - [types field='session-title'][/types]</a></div>
 
[wpv-conditional if="( $(wpcf-type-of-speaker) ne '' )"]
<div style="padding-top: 2px;">[types field='type-of-speaker'][/types]:</div>[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-speaker-1-name) ne '' )"]
<div><span style="font-weight: 600;">[types field='speaker-1-name'][/types]</span><br />
[types field='speaker-1-title'][/types] - [types field='speaker-1-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-speaker-2-name) ne '' )"]
<div style="padding-top: 2px;"><span style="font-weight: 600;">[types field='speaker-2-name'][/types]</span><br />
[types field='speaker-2-title'][/types] - [types field='speaker-2-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-speaker-3-name) ne '' )"]
<div style="padding-top: 2px;"><span style="font-weight: 600;">[types field='speaker-3-name'][/types]</span><br />
[types field='speaker-3-title'][/types] - [types field='speaker-3-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-speaker-4-name) ne '' )"]
<div style="padding-top: 2px;"><span style="font-weight: 600;">[types field='speaker-4-name'][/types]</span><br />
[types field='speaker-4-title'][/types] - [types field='speaker-4-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-moderator-name) ne '' )"]
<div style="padding-top: 2px;">MODERATOR - <span style="font-weight: 600;">[types field='moderator-name'][/types]</span><br />
[types field='moderator-title'][/types] - [types field='moderator-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-facilitator-name) ne '' )"]
<div style="padding-top: 2px;"><span style="font-weight: 600;">[types field='facilitator-name'][/types]</span><br />
[types field='facilitator-title'][/types] - [types field='facilitator-company'][/types]</div>
[/wpv-conditional]
 
[wpv-conditional if="( $(wpcf-learning-units) ne '' )"]
<div style="font-style: italic; font-size: 14px; padding-top: 2px">Qualifies for: [types field='learning-units'][/types]</div>[/wpv-conditional]</td>
</tr>
    </wpv-loop>
        </tbody>
    </table>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]
#540218

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

Thanks for bringing the thread to my attention. I was able to successfully re-open the thread.

We can continue our discussions there.

Thanks,
Shane

#541357

Thanks, Shane

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