This worked. Thank you!
Calin, thank you!
Hi,
Thank you, but that is the first thing I tried to do. The tag div composer is unusable right now due to that error. I cannot create new elements or select existing ones to delete the code.
The WordPress Revisions also do not show the history because the edits were made inside a text column of the TagDiv Single Post Template. WordPress revisions do not seem to keep track of Single Post Template edits.
Is there a version history for single post templates that I can revert back to? Also where is content for single post templates stored — is the content stored on Tagdiv’s server or is it in our own hosted database?
Thank you!
Sounds good, Anamaria. Thank you! It seems it may have been inadvertently commented out as the behavior it produces is expected/correct and there is code all throughout the code base to support it.
Thanks again,
Patrick
Hello,
I just discovered code already in the theme that accomplishes exactly what I am looking for, but it has been commented out by your team.
wp-content/plugins/td-cloud-library/shortcodes/common
/**
* on composer iframe and on templates that do not have posts we show the no posts message
* @see td_page_generator::no_posts() - this function generates the __td('No posts to display').
* the text can be overwritten by the template using the global @see td_global::$custom_no_posts_message
*/
//if ( tdc_state::is_live_editor_ajax() || tdc_state::is_live_editor_iframe() ) {
//$buffy .= td_page_generator::no_posts();
//} else {
//$offset = intval($this->get_att('offset'));
//if ( $offset === 0 ) {
//$buffy .= td_page_generator::no_posts();
//}
//}
Lines 1717 – 1724.
When uncommented, this block shows the “No posts” message as expected.
Is this intentionally commented out or was it a mistake?
I would like a way to preserve my update of uncommenting it so that I don’t have to re-do it during the next theme update.
Please let me know if this is possible.
Thank you,
Patrick
-
This reply was modified 4 years by
patrickrodo.
-
This reply was modified 4 years by
patrickrodo.
-
This reply was modified 4 years by
patrickrodo.
Thank you!
Final question — I am trying to use a child theme to avoid losing the custom work every time I update WordPress/the Newspaper theme.
I have tried the following file structures and none of them seem to work:
- wp-content/themes/Newspaper-child/modules
- wp-content/themes/Newspaper-child/includes/modules
- wp-content/themes/Newspaper-child/td-cloud-library/modules
How do I modify wp-content/plugins/td-cloud-library/modules/tdb_module_loop.php, tdb_module_loop_2.php, and
wp-content/plugins/td-composer/legacy/common/wp_booster/td_block.php in the child theme?
Hello Anamaria,
That’s alright if there is no built in setting. I have experience programming — I just need to be pointed in the right direction.
Which file contains the logic for the Posts Loop element so that I can modify it to display a message if there are no posts?
Thank you.
-
This reply was modified 4 years by
patrickrodo.
Thanks Vlad.
I confirmed that form is showing up on the AMP version of a new blank page I created, but I need the form on the single post page. It uses the “Single Post Template – Estates” template.
How can I achieve this?
Hi Vlad,
Thanks.
So is it possible to add a form to the AMP version of the site or not?
That’s the main question of this thread and our other one here: https://forum.tagdiv.com/topic/sidebar-disappearing-in-amp-mobile/#post-376370
Hey Vlad,
Thanks for your thorough response.
I’m confused now because your teammate recommended the opposite of what you just recommended in my other thread: https://forum.tagdiv.com/topic/adding-a-form-to-amp-version/#post-376132
He said to insert a shortcode from wpforms and that it would work with the mobile theme and AMP — you’re saying it will not work. This is confusing coming from the same team.
All I need to do is add a simple form with an email field that’s connected to my Mailchimp account to the AMP version of my site. Is this possible or not?
Thank you!
Hi Calin,
How do I access the mobile editor? I’ve been doing everything using the TagDiv Composer. I added a wpforms shortcode and it is still not showing up in the AMP version of my site.
Thanks
It’s still under development, but this is it so far. The form in the sidebar should ideally collapse under the content of a single post, but it disappears entirely.
I’ve also tried manually adding the form directly under the content with a new row, but it still gets stripped in AMP.
The Newspaper Mobile Theme plugin comes with the theme. Activate it and you will have a mobile version from the desktop version.
To clarify my question, I’d like the sidebar to stack under the content. It contains a form and I can’t get the form to show up on my amp site.
After looking at the Chrome dev console, I noticed this error
VM19772:52 Uncaught ReferenceError: tdcDebug is not defined
Disabling Rocket Loader in Cloudflare fixed this and I am now able to edit using the WP Editor.
Not sure why Rocket Loader from Cloudflare breaks this.
CLOSED