- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsOffset Feature
- TutorialsWhat is Ajax preloading?
Step by step, how do I set up a Trends column on the righthand side of the pages after the Home page? I can use this information for the three websites I am working on.
Here is the main website with an example of the page it will be on:
https://thevalue.ca/featured/microsoft-unveils-search-engine-powered-by-chatgpt/
I did a search for the documentation and there were no results.
Thanks in advance.
G
Hi, thanks but this isn’t solving the problem. Watch this video recording from a mobile phone and you will be able to see that the AMP version isn’t working well. Link – https://youtu.be/msMl1ltoRZI
Problems on the category page
1. The homepage header is dark and the logo isn’t visible.
2. Uppercase letters have accent marks.
3. Author’s name and date are visible, we don’t want that.
4. The footer shows a random ‘About us’
Problems on articles
1. Primarily, the layout in the /?amp/ preview link looks completely different from the actual AMP version displayed on mobile. See the video I sent above and compare it for yourself – https://www.mamapeinao.gr/makaronada-me-pantzari/?amp=1/
2. The images do not show at all in the AMP version.
3. The header and footer are all weird in the AMP version of the articles. Again, look at the video to see for yourself.
So how do you advise us to resolve these problems? Again, I have the mobile theme but any change I make isn’t visible in the AMP version.
Greetings.
Probing one of our websites, running Newspaper 12.2 with WordPress 6.1.1, we have found that there is a security vulnerability on category pages that use infinite loading.
This option:
Theme Panel > Categories > Category global settings > Pagination style > Infinite loading
When this infinite loading is active Newspaper does a POST request to wp-admin/admin-ajax.php with a loopState action to retrieve more posts, and the response is not properly escaped leading to an opening that can allow a reflected cross-site scripting attack.
Here’s an example on your own demo site:
The request:
curl 'https://demo.tagdiv.com/newspaper_pro/wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=12.2' \
-H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
-H 'x-requested-with: XMLHttpRequest' \
--data-raw 'action=td_ajax_loop&loopState%5BsidebarPosition%5D=no_sidebar&loopState%5BmoduleId%5D=17&loopState%5BcurrentPage%5D=2&loopState%5Bmax_num_pages%5D=2&loopState%5Batts%5D%5Bcategory_id%5D=1&loopState%5Batts%5D%5Boffset%5D=3&loopState%5Bajax_pagination_infinite_stop%5D=%3Cimg+src%3DBOGUS%3E&loopState%5Bserver_reply_html_data%5D='
The (truncated) response:
HTTP/1.1 200 OK
...
Content-Type: text/html; charset=UTF-8
...
{
"sidebarPosition":"no_sidebar",
"moduleId":"17",
"currentPage":"2",
"max_num_pages":"2",
"atts": {
"category_id":"1",
"offset":"3"
},
"ajax_pagination_infinite_stop":"",
"server_reply_html_data":""
}
Notice how parameters sent for the loopState action via ajax are reflected back to the client unescaped. In this example, the parameter ajax_pagination_infinite_stop was altered to include a bogus image tag instead of a number. Because HTML tags are not being properly escaped when the response JSON is encoded, and combined with the fact that the Content-Type of the response is text/html, this results in the malformed request being reflected towards the client and rendered as HTML, which can be abused by a malicious actor.
A possible solution:
On your td-composer plugin, the function on_ajax_loop of the class td_ajax deals with loopState requests. Currently it returns with the following statement:
die(json_encode($loopState));
Supplying the flag JSON_HEX_TAG to encode the symbols for opening and closing HTML tags seems to mitigate the issue:
die(json_encode($loopState, JSON_HEX_TAG));
Best regards.
Hello,
I would like to integrate the lead block into the content.
Do you have any solution?
Find an example right here:
It should be defined as ad to be integrated.
thanks,
Armand
Hi,
On the author pages, author posts are currently not displaying (despite the fact that I’ve selected the ‘post loop’). See here for an example: https://eydaily.nl/author/redactie-criminalitijd/
Kind regards,
Sorry but when I hide the audio block it also hides the article text.
So, I have to look for another solution, until an update for – the bug for the amp with the featured audio.
Thanks
Hello Bettina,
The website is not yet live. And we would like to create a search and filter table not dissimilar to the cryptocurrency one which can be found on this wpdatatables link. In the past it was compatible with Newspaper but this is no longer the case.
My question to you is how can this be created?
Best regards,
Amaechi
Good morning! Which would be the best settings or which plugins in combination would be useful to free the page faster and from loads? Can also be plugins that have to be paid for. I’m happy with the speed, but would like to optimize even more. I’m currently using the WP Super Cache plugin with the settings they published. thank’s for the Tipps
Hello,
Yes, you need to use a custom code css to hide the first module.
For example for Big Grid Flex 9, you can display 5 posts, but you need to hide two modules .
You can use this code for big grid flex 9 .td_block_big_grid_flex_9 .td_module_flex_6
{
display: none;
}
Please set this code in the theme panel > custom code> advance css > phone section and will be applied only on a mobile or if you want to apply also on a desktop only in custom code -> custom css.
Thank you!
Hello,
You have the mobile theme plugin activated, the mobile theme comes with its own templates for page, post, category, etc so your current templates from the desktop theme will get converted to the mobile theme layout, the page content is made without builders in mobile editor => https://www.screencast.com/t/xbgZG8kH also, the options that are provided to edit the mobile theme version are limited (this keeps the things simple)).
Better deactivate the plugin and see the results.
This is a video about Responsive Newspaper Theme, AMP & Mobile Theme, Mobile Pages & Templates -> https://www.youtube.com/watch?v=SpGkOnJeNZY
Thank you!
Hello,
You need to have Amp URL “/?amp” -> https://i.imgur.com/UNQ1I0T.png and if you have set the redirect mobile to AMP then will be /?amp=1 as it is written in the documentation => https://www.screencast.com/t/IpVB48WJVG -> https://forum.tagdiv.com/tagdiv-amp-plugin-tutorial/
Thank you!
I just published my website using your theme. The AMP pages used to work fine with the previous theme. Now they don’t look good at all, the images are not showing and the layout is all over the place. Link is https://www.mamapeinao.gr/portokalopita/amp/
I tried to use your mobile theme only for AMP, I followed your instructions from the forum and changed the settings and it made absolutely no difference. None of my changes on the theme panel were applied in the AMP pages.
How can I edit the AMP pages so they look good??
Hello,
Yes, you need to use Mobile Theme.
No, you can’t create mobile templates and use them with Amp.
Thank you!
Hi,
when I want to use AMP, I have to use the tagDiv Mobile Theme plugin, correct? I’m wondering if it is possible to create a mobile template via Cloud templates to use that for AMP?
Thanks
Hello,
The mobile+AMP has standard templates, and you can’t customize them.
Please check this topic where I explained each mobile version -> https://forum.tagdiv.com/topic/mobile-version-not-working-properly-2/ and choose your mobile version.
Thank you!
Hello Anamaria,
I know about the Mobile/AMP settings via the Theme Panel, but these are very shallow. I want to get closer to the structure of my standard site that I handle via cloud templates. Where/how do I need to modify something for changing the front-end AMP-structure?
Thanks!
Hello,
I just checked and seemed to be a bug for the amp with the featured audio.
Until this is solved, you can hide the audio block that is displayed on the desktop and let it to the amp.
Thank you!
Hello,
1. No, unfortunately, there is no such option to show first the paid subscribers.
2. You need to edit the module for a search like in this guide -> https://forum.tagdiv.com/edit-modules-flex-block-x/. Unfortunately, to display as an example provided, it requires more programming knowledge.
Also, you can use The Flex Loop elements -> https://forum.tagdiv.com/filters-sorting-taxonomies/
Thank you!
Hello Peter!
Take a look here in this video for example where I build 6 columns: https://www.screencast.com/t/mZ2c5XamTFN
I hope that helps you!
Thank you!
Hello,
The settings for AMP are the same for mobile theme; you can find them in Theme Panel -> Mobile Theme.
Thank you!
Hello,
The options from the Theme Panel are for the standard template, but you have a Pro Prebuilt website and this uses cloud templates, which can be edited with tagDiv Composer ->https://www.screencast.com/t/UeBGkaYuundl, go to the footer and select the element you want to edit => https://www.screencast.com/t/3vhZ5v4k and change the description.
The same steps are for all templates -> https://forum.tagdiv.com/footer-templates/
Our theme is a frontend theme for most of the elements and changes, you’ll need to use the tagDiv Composer to edit the pages and templates for posts/categories, etc => https://i.imgur.com/I3OUYxr.jpg -> https://i.imgur.com/mMrEufY.jpg from the frontend, no in the code -> https://www.screencast.com/t/LDdokrHPl
Also, this is a video on how to change the logo -> https://www.youtube.com/watch?v=HXQQygkCCJo -> https://forum.tagdiv.com/add-logo-newspaper/
The theme accent color it only applies to certain elements, for example, to back to top button.You can copy and paste the style from one block to another.
You can use the Global Colors option from Manager -> Global Colors -> https://i.imgur.com/PM6VoBL.png
Thank you!
Hi,
am using the mobile theme only for AMP on https://tinyurl.com/wn4239zr. In addition, I’m using cloud templates for the standard site. I’m wondering, how can I bring the AMP as close as possible to the structure of the standard site? In this case especially, I’m trying to integrate the prev-next post element on top and bottom of each post.
Thanks,
eC
Hi,
I have developed my website using Newspaper using cloud templates for various pages such as Single Post Template, category Template, etc. However I am having an issue with this – these templates can be viewed by typing in the respective URL in the address bar. For example, typing the address http://www.sitename.com/single-template displays the single post template. How do I hide these templates/prevent users from viewing them via URL?
1. Is there a way to randomize the search results, or offer a rotation so that paid subscribers have equal number of time that they show on top, 2nd, 3rd etc, while free plans always show after paid subscribers in the search results?
2. Is there a way to change the way the search results are displayed? for example something like this:
https://www.psychologytoday.com/us/therapists?search=new%20york
Thank you
I have removed the “hide image” in Mobile Theme but,
As you may confirm, in Mobile, it shows the image and the audio control now
but not in AMP.
The article/Audio Link: https://noticiaslx.pt/2023/02/02/loures-apresentacao-publica-metro-ligeiro-palacio-dos-marqueses-parque-da-cidade/
Thanks
-
This reply was modified 3 years by
AntonioT.