Skip Navigation

[Resolved] Conditional output to display additional content if it's home

This support ticket is created 7 years, 11 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.

Our next available supporter will start replying to tickets in about 2.38 hours from now. Thank you for your understanding.

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 deanL 7 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#393299

While editing Content Template, is it possible for me to use Conditional output to check if the content is being viewed on homepage? I was to add additional content in the Template if the post is viewed on homepage,

#393406

Shane
Supporter

Languages: English (English )

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

Hi Dean,

Thank you for contacting our support forum.

The only way to do this is by using a custom function called is_home() . This is a native function in wordpress so you will need to add it to the 3rd party function arguments for Views.

We actually have a tutorial for this that shows how to use functions in our conditional shortcodes.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/

Thanks,
Shane

#393544

Thank you Shane, I'll give it a shot!

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