- NewsmagUsing the theme translations together with WPML
- NewsmagHow to update a plugin
- NewsmagCustom Post Type Support
- NewsmagAbove footer ads
- NewsmagWeather Widget
- NewsmagHow to update the theme
- NewsmagIntroduction
- NewsmagLogo & Favicon
- NewsmagFooter templates
- NewsmagUsing other ads
- NewsmagCustom ad spots
- NewsmagArticle ads
- NewsmagSidebar ads
- NewsmagHeader ads
- NewsmagLoading image effects
- NewsmagCategory top post styles
- NewsmagSmart Lists
- NewsmagGeneral settings
- NewsmagTheme thumbs
- NewsmagtagDiv slider gallery
Hi,
You got that errors on those pages because you have some code for auto ads that are not use -> https://validator.ampproject.org/#url=https%3A%2F%2Fvizartpandey.com%2Fabout-us%2F%3Famp
Please make sure that you have set the auto ads only in Mobile theme Amp Ads -> https://www.screencast.com/t/2BzLqi0MI3 please make sure that you do not set any code in theme/plugin files for auto ads.
Thank you!
Hi,
You should be able to access that file on the server with a file manager, FTP or cPanel for example. Like this for example – https://www.inmotionhosting.com/support/website/php/update-local-php-settings
If that is not possible, the best advice would be to contact the hosting provider and ask them to do it for you, that should be possible.
Thanks
Hi,
Please notice that if you want to have the AMP valid on your website, you need to enable it together with the Mobile Theme. For more details, please check here -> https://tagdiv.com/amp-newspaper-theme/
Thanks for your understanding!
Hi,
I have checked your AMP page with some official validators and it seems to bring well results, as you can see here -> https://www.screencast.com/t/qJTmb0yEZeKh
Thank you!
Hi,
Those look like the same errors mentioned here – https://wordpress.org/support/topic/amp-paired-two-errors/ – http://prntscr.com/mzeerr
The first error seems to be a script added by woocommerce, the other mentions that an AMP tag appears more than once. The first thing to do would be to deactivate plugins and keep testing to see if they still appear as errors.
Thanks
Hi,
If you want to load some ads other than the Google Adsense when you are using the AMP, notice that you should add the Ad Code in the Mobile Theme Ads section, from here -> https://www.screencast.com/t/mG8kFlnWE
Thanks for your understanding!
Hi, I want to use Amazon Mobile Popover on newspaper mobile theme and AMP version. But how to set up this?
Simion,
now is ok because I have turned off ‘SHOW ON AMP’ in the mobile plugin…
to avoid penalisation by google…
in this way however the page amp is without css
The problem is caused by js_composer (wp Bakery plugin).
I’ve been writing the problem for over a week.
Please solve
Thanks!
-
This reply was modified 7 years by
Bintmusic.
Hi! Once again about AMP and generally about traffic from mobile devices. In my opinion you should start thinking about mobile as a most important goal. In my case mobile generate about 68% traffic, but if I make any campain on social media this rise up to 90%. This is how we living and we must accept this. In “Newspapper” theme, mobility is treat an add one. Maybe it’s time to change mind set? What is your opinion?
Hi,
In order to achieve that you’ll need to make some changes in theme files.
If you are using the default category templates, you need to go in D:\XAMPP\htdocs\test_site95\wp-content\themes\Newspaper\includes\wp_booster\td_category_template.php -> https://www.screencast.com/t/aTtEY9A3iDHj and comment like this -> https://www.screencast.com/t/Hg5V25abwH6
If you are using a category template from tagDiv Cloud library please check this topic
-> https://forum.tagdiv.com/topic/siblings-category-element/
Thank you!
Hi,
the problem with the shown code on the front page is solved. It disappeared by its own.
Thanks…but the integration of codes from Vimeo, Facebook & Co is still a problem. 🙁
Thanks for helping!
Hi,
the problem with the shown code on the front page is solved. It disappeared by its own.
Thanks…but the integration of codes from Vimeo, Facebook & Co is still a problem. 🙁
Thanks for helping!
That looks like the hero element, you can change the font of the title in the composer directly – http://prntscr.com/mzdaeo
Or in general in the theme panel, for example – http://prntscr.com/mzdao5
– http://prntscr.com/mzdaxl
Hi,
I made some test and now your amp is working ->https://validator.ampproject.org/#url=https%3A%2F%2Fwww.sentiersduphoenix.be%2Frandonnee-hivernale-au-depart-de-la-brasserie-chouffe%2Famp
Please make sure that if you do not use the option from mobile them -> https://www.screencast.com/t/5icOxmjnY , please use only the classic option from amp -> https://www.screencast.com/t/IycdW15p
Thank you!
Also, please explain why all the following is commented out from the file …\Newspaper\includes\plugins\td-composer\includes\tdc_main.php:
//// Add external shortcodes
//if ( tdc_state::is_live_editor_iframe() || tdc_state::is_live_editor_ajax() ) {
// register_external_shortcodes();
//
// // Change the callbacks of the shortcodes not registered in TagDiv Composer
// // Important! Here it’s too late to map these shortcodes, the mapping should be where the ‘$tdc_admin_settings’ is set (@see ‘admin_head’ action)
// add_filter( ‘the_content’, ‘tdc_on_the_content’ );
// function tdc_on_the_content( $content ) {
//
// $mappedShortcodes = tdc_mapper::get_mapped_shortcodes();
//
// //var_dump( $mappedShortcodes ); die;
//
// global $shortcode_tags;
//
// if (empty($shortcode_tags) || !is_array($shortcode_tags))
// return $content;
//
// // Find all registered tag names in $content.
// preg_match_all( ‘@\[([^<>&/\[\]\x00-\x20=]++)@’, $content, $matches );
// $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
//
// if ( empty( $tagnames ) ) {
// return $content;
// }
//
// foreach( $tagnames as $tagname ) {
// if ( ! array_key_exists( $tagname, $mappedShortcodes ) ) {
// add_shortcode( $tagname, ‘tdc_external_shortcode’ );
// }
// }
//
// global $vc_shortcodes;
//
// foreach( $vc_shortcodes as $vc_shortcode ) {
// add_shortcode( $vc_shortcode, ‘tdc_external_shortcode’ );
// }
//
// return $content;
// }
//}
//function tdc_map_not_registered_shortcodes($postId) {
// $currentPost = get_post($postId);
//
// $mappedShortcodes = tdc_mapper::get_mapped_shortcodes();
//
// //var_dump( $mappedShortcodes ); die;
//
// global $shortcode_tags;
//
// if (empty($shortcode_tags) || !is_array($shortcode_tags))
// return;
//
// // Find all registered tag names in $content.
// preg_match_all( ‘@\[([^<>&/\[\]\x00-\x20=]++)@’, $currentPost->post_content, $matches );
// $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
//
// if ( empty( $tagnames ) ) {
// return;
// }
//
// foreach( $tagnames as $tagname ) {
// if ( ! array_key_exists( $tagname, $mappedShortcodes ) ) {
// add_shortcode( $tagname, ‘tdc_external_shortcode’ );
// }
// }
//
// global $vc_shortcodes;
//
// foreach( $vc_shortcodes as $vc_shortcode ) {
// add_shortcode( $vc_shortcode, ‘tdc_external_shortcode’ );
// }
//}
[…]
//global $vc_shortcodes;
//
//$vc_shortcodes = array(
// ‘vc_btn’,
// ‘vc_icon’,
// ‘vc_tta_tabs’,
// ‘vc_tta_section’
//);
//
//
//
//function map_not_registered_shortcodes() {
//
// global $post;
//
// if (!isset($post)) {
// return;
// }
//
// $mappedShortcodes = tdc_mapper::get_mapped_shortcodes();
//
// //var_dump( $mappedShortcodes ); die;
//
// global $shortcode_tags;
//
// //var_dump($shortcode_tags); die;
//
// if (empty($shortcode_tags) || !is_array($shortcode_tags))
// return;
//
// // Find all registered tag names in $content.
// preg_match_all( ‘@\[([^<>&/\[\]\x00-\x20=]++)@’, $post->post_content, $matches );
// $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
//
// if ( empty( $tagnames ) ) {
// return;
// }
//
// foreach( $tagnames as $tagname ) {
// if ( ! array_key_exists( $tagname, $mappedShortcodes ) ) {
//
// tdc_mapper::map_shortcode(
// array(
// ‘map_in_visual_composer’ => true,
// ‘base’ => $tagname,
// ‘name’ => $tagname,
// ‘params’ => array(
// array(
// ‘type’ => ‘textfield’,
// ‘heading’ => ‘Extra class name’,
// ‘param_name’ => ‘el_class’,
// ‘description’ => ”,
// )
// )
// )
// );
// }
// }
//
// global $vc_shortcodes;
//
// foreach ($vc_shortcodes as $vc_shortcode) {
// tdc_mapper::map_shortcode(
// array(
// ‘map_in_visual_composer’ => true,
// ‘base’ => $vc_shortcode,
// ‘name’ => $vc_shortcode,
// ‘params’ => array(
// array(
// ‘type’ => ‘textfield’,
// ‘heading’ => ‘Extra class name’,
// ‘param_name’ => ‘el_class’,
// ‘description’ => ”,
// )
// )
// )
// );
// }
//}
/**
* edit with td composer
*/
Thank you.
Perhaps there are some admin settings I need to change to get shortcodes from excerpts to work on category pages, again.
Hello – I’m looking to replicate several blocks from the templates provided on TD composer. For example I’m looking at Block 11 – Full 2 (by TagDiv). I’d like to replicate the article meta info block that extends into the article image in the example but when I import the section, it only slightly extends into the article image. I’ve tried to change the article meta info details in TD composer but no luck. Could you let me know what to do?
Hello there,
When creating a post, and trying to use Post Template 3 or 4, the picture comes up blank.
In the case of Post Template 3, as an example, the title comes up over a black rectangle.
Where are these two trying to pull the picture from (I’m assuming the featured image??)
Post Templates 6 and 7 work as expected, so we’re trying to figure out what we are doing wrong.
Any help would be greatly appreciated.
Best
Mike
Hello,
I checked the forum but I didn’t find what I need.
I’m using the Header Style 1 in Newsmag 4.7 but the logo quality is very low. I would like to have it bigger and in better quality.
website
Can someone help me with it?
Thanks.
The code was a mess 🙂
static function get_post_meta_array($post_id, $key) {
$lookat=array(
2247=>"single_template_3",
4360=>"single_template_10"
);
$post_meta = get_post_meta($post_id, $key, true);
$category = get_the_category($post_id)[0];
$first_category = $category->term_id;
if (!is_array($post_meta)&&!isset($lookat[$first_category])) {
$post_meta=array();
return $post_meta;
}elseif(!is_array($post_meta)&&isset($lookat[$first_category])){
$post_meta=array();
$post_meta["td_post_template"]=$lookat[$first_category];
return $post_meta;
}
return $post_meta;
}
I have the solution for the problem, is a little ”handmade” but it works.
you have to edit the function get_post_meta_array in \includes\wp_booster\td_util.php row 1540 whit this enhanced function:
static function get_post_meta_array($post_id, $key) {
$lookat=array(
//id_category=>"single_template_xx"
2247=>"single_template_3",
4360=>"single_template_10"
);
$post_meta = get_post_meta($post_id, $key, true);
$category = get_the_category($post_id)[0];
$first_category = $category->term_id;
if (!is_array($post_meta)&&!isset($lookat[$first_category])) {
$post_meta=array();
return $post_meta;
}elseif(!is_array($post_meta)&&isset($lookat[$first_category])){
$post_meta=array();
$post_meta["td_post_template"]=$lookat[$first_category];
return $post_meta;
}
return $post_meta;
}
You have to populate the array with the association category_id -> post_template, the variables are single_template_1 to single_template_13.
Custom post settings will be maintained.
Hope to be useful
I found that mistake comes from a conflict between WP Super Cache and AMP. How can I fix that? Because your theme works best with WP Super Cache.
And now AMP test does not recognize my site : https://prnt.sc/mz2faj
All my settings here: https://prnt.sc/mz2k1w ; https://prnt.sc/mz2k47
-
This reply was modified 7 years by
ngojclee.
Hi, what kind of code should I enter here https://i.imgur.com/AAvkVdc.jpg ?
The Universal Analytics?
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-53020307-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-53020307-1');
</script>
Or this?
{
"vars":{
"account":"UA-53020307-1"
},
"triggers":{
"trackPageview":{
"on":"visible",
"request":"pageview"
}
}
}
Hi, I try to use the Mobile Theme. It works, I can reach amp test with Google. But I have some questions.
My site is : https://ngojclee.com
1/ I could not edit footer of Mobile Theme, and it’s so weird without content in ABOUT US. https://prnt.sc/mz1tr0
Otherwise, I use my edited footer in normal theme. https://prnt.sc/mz1urp
2/ Some articles I don’t want to publish on latest posts. Can I control it like hiding some categories? Actually, I filter by a specific category and made a password protect here. https://prnt.sc/mz1ves
3/ Do I need to make a subdomain for mobile version? Cause I’m using Cloudflare and W3TC. I’m not sure it works well with Mobile Theme. One time, after open and all right configs, my frontpage transfer to mobile version for desktop and other devices too.