Skip Navigation

[Résolu] Display ads or related posts within post content

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 Il y a 6 années et 1 mois. 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 – 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)

Marqué : 

This topic contains 1 réponse, has 2 voix.

Last updated by Luo Yang Il y a 6 années et 1 mois.

Assisted by: Luo Yang.

Auteur
Publications
#620477

Is it possible to inject any ad shortcode within the post content ?

I mean something like newspaper themes like that

Part of Content
Shortcode ( ads or related posts )
Another Part of Content

note that the content in DB is one piece and not fields !

so I need to know if it is possible to make any content appear in the post content after half or any % of the post contet

Thanks in Advance 🙂

#620829

Hi,

There isn't such a built-in feature within Toolset plugins, but it can be done by some custom PHP codes, for example,
1) use WordPress built-in filter hook the_content, to trigger a PHP function,
https://developer.wordpress.org/reference/hooks/the_content/
2) In this PHP function, inject your ad codes into it

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.

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