Viewing 6 posts - 1 through 6 (of 6 total)
This forum is now closed to new posts
All existing content remains available to browse and search. For support, please email us at contact@tagdiv.com Our team is happy to help as soon as possible.
To continue this thread, here’s how I managed to achieve what I wanted.
In my custom module, I added an element of the “Column Title” type from the “Multipurpose shortcode” category, and in the title, I placed “foobar”.
Then, in the plugin file td-composer : td_multi-purpose/shortcodes/tdm_block_title_simplified.php,
I modified line 56 with the variable $buffy.
If I detect the title “foobar”, then I use do_shortcode() and call my function to add a dynamic element.
This works on the front-end, no regression, BUT it remains unstable when editing in the back-office. I will need to add a condition: if back-office, do not load do_shortcode(). Nothing difficult, but not urgent for me.
The code is well-documented, and for future updates, I’ll just need to be careful.
Thank you for your response.
Maybe I can modify an existing element to make it use my shortcode? My goal is to display dynamic content in addition to the default content that will appear in this module (title, excerpt, image, date) inside a loop
For example, the “Column Title” element from “Multipurpose shortcodes”—where can I find the PHP file or code to modify it? I have tried searching in td-composer folder without success.
Thank you
Hi,
I needed for my plugin, and using an additional module on template will probably delay execution.
For thoses who need this is what I used :
url_to_postid($_SERVER[‘REQUEST_URI’]) <= single post
get_page_by_path($_SERVER[‘REQUEST_URI’]) <= page
Thank you.
For those who are interested in a solution
The function that manages it is called get_excerpt() line 795 of the file
plugins/td-composer/legacy/common/wp_booster/td_module.php
if ($this->post->post_excerpt != '') {
return $this->post->post_excerpt." foobar";
}
It remains to manage the problem during the update. But one thing at a time.
Regards
Right, that the part I missing in the blue box, thank you.
Problem for me now is historical the Excerpt field is used for SEO purpose in head meta page. So I need a way to shrink it for displaying in elements on the homepage. Is there way to make a Hook to change the behavior without modified the TagDiv Composer plugin ? it will be nice
Hi,
Well, I’m missing something then.
I took 2 screenshots here and highlighted where I work
https://postimg.cc/gallery/XVs8F8v
1: Flex Block 5 > Excerpt length: 1 (type theme panel parameters: “On letters” / but “On words” do the same result)
2: Article presented with excerpt used
Can you guid me where is,in TagDiv Composer, the file who is used for this flex block. I will try to test with php the output
thank you
Regards
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-advertisement | 1 year | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement". |
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
| Cookie | Duration | Description |
|---|---|---|
| _ga | 2 years | This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors. |
| _gat_gtag_UA_43963494_1 | 1 minute | This cookie is set by Google and is used to distinguish users. |
| _gid | 1 day | This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visted in an anonymous form. |
| Cookie | Duration | Description |
|---|---|---|
| IDE | 1 year 24 days | Used by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile. |
| test_cookie | 15 minutes | This cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies. |
| VISITOR_INFO1_LIVE | 5 months 27 days | This cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website. |
| YSC | session | This cookies is set by Youtube and is used to track the views of embedded videos. |
| Cookie | Duration | Description |
|---|---|---|
| CONSENT | 16 years 5 months 26 days 13 hours 25 minutes | No description |
| yt-remote-connected-devices | never | This cookies is set by Youtube and stores the user's video player preferences using embedded YouTube video. |
| yt-remote-device-id | never | This cookies is set by Youtube and stores the user's video player preferences using embedded YouTube video. |