- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsOffset Feature
- TutorialsWhat is Ajax preloading?
Hello,
How do I add a comma to the numbers displayed in stats? For example, 12,000 instead of 12000?
Also, any way to enable stats on pages?
Thanks
I found that there is a function being called when you add a post that parses the content and processes the shortcode
Managed to find it and it now works – here is my very specific solution
<h3>Videos</h3>
<?php
$videos = get_posts(array(
'post_type' => 'post',
'category' => 53,
'meta_query' => array(
array(
'key' => 'article_event', // name of custom field
'value' => '"'.get_the_ID().'"', // matches exaclty 123", not just 123. This prevents a match for "1234"
'compare' => 'LIKE'
)
)
));
//echo get_the_ID();
if( $videos ):
$vID = '';
$vArray = array();
foreach( $videos as $video ):
$vID .= get_field( "article_video_id", $video->ID ) .',';
$vArray[] = get_field( "article_video_id", $video->ID );
endforeach;
endif;
$vID = rtrim($vID, ',');
function jj_get_video_info_data ($array_param){
$list_to_parse = $array_param;
$list_to_parse = explode(',', $list_to_parse);
$buffy = array();
//echo $list_to_parse;
foreach($list_to_parse as $id_video) {
$id_video = trim($id_video);//possible to have spaces
//echo '['.$id_video.']';
$response = wp_remote_get('https://www.googleapis.com/youtube/v3/videos?id=' . $id_video . '&part=id,contentDetails,snippet&key=AIzaSyBneuqXGHEXQiJlWUOv23_FA4CzpsHaS6I', array(
'sslverify' => false
));
if (is_wp_error($response)) {
break;
}
$data = wp_remote_retrieve_body($response);
if (is_wp_error($data)) {
break;
}
$obj = json_decode($data, true);
$buffy[$id_video]['thumb'] = td_global::$http_or_https . '://img.youtube.com/vi/' . $id_video . '/default.jpg';
$duration = $obj['items'][0]['contentDetails']['duration'];
if (!empty($duration)) {
preg_match('/(\d+)H/', $duration, $match);
$h = count($match) ? filter_var($match[0], FILTER_SANITIZE_NUMBER_INT) : 0;
preg_match('/(\d+)M/', $duration, $match);
$m = count($match) ? filter_var($match[0], FILTER_SANITIZE_NUMBER_INT) : 0;
preg_match('/(\d+)S/', $duration, $match);
$s = count($match) ? filter_var($match[0], FILTER_SANITIZE_NUMBER_INT) : 0;
$buffy[$id_video]['title'] = $obj['items'][0]['snippet']['title'];
$buffy[$id_video]['time'] = gmdate("H:i:s", intval($h * 3600 + $m * 60 + $s));
}
}
if(!empty($buffy)) {
return $buffy;
} else {
return;
}
}
$td_playlist_video['youtube_ids'] = jj_get_video_info_data($vID);
$td_playlist_video['youtube_title'] = 'Whatever';
//print_r($td_playlist_video);
update_post_meta(get_the_ID(),'td_playlist_video',$td_playlist_video);
$videoSC = '[vc_row][vc_column][td_block_video_youtube playlist_title="TITLE" playlist_yt="'.$vID.'"][/vc_column][/vc_row]';
echo do_shortcode($videoSC);
?>
Hi
I have same problem with Facebook:
This is my group phuketus
and in Social Counter only 0 members but they are more than 100 https://www.facebook.com/groups/phuketus/members/
In YouTube – work is normal… YouTube has 2 settings (User & Channel)
User: http://www.youtube.com/user/ENVATO
Channel: http://www.youtube.com/channel/UCJr72fY4cTaNZv7WPbvjaSw
Result

Settings

How I can fixed it?
Hi,
@TechTris – You have to use WordPress SEO by Yoast, it adds og data on page. Check the page source for duplicate og data coming from another plugin, if you see for example two og:image parameters on the source check which plugin adds the second parameter.
Facebook uses a cache, after each modification you have to reset it from their debugger – https://developers.facebook.com/tools/debug/ – just press the “Fetch new scrape information” button to reset the cache – http://screencast.com/t/uB7rcVia
If this doesn’t help please provide the url so we can take a look.
Thank you!
Hello ,
I have a problem . On my homepage I Program 10 items per page. Pour continuer To read the various articles , It Must go to page 2, for example .
But impossible to go to page 2, I get stuck on the page number 1.
How to change this ?
Thanks for your help !
Here is my .htaccess(chmod 755):
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^other/(.*) /wp-includes/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^file/(.*) /wp-content/uploads/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^ext/(.*) /wp-content/plugins/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^skin/main\.css //index.php?style_wrapper=1&putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^skin/style.css /nothing_404_404?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^skin/(.*) /wp-content/themes/Newspaper-child/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^Newspaper/(.*) /wp-content/themes/Newspaper/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^skin_main/(.*) /wp-content/themes/Newspaper/$1?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^ajax /wp-admin/admin-ajax.php?putyo_hide_my_wp=pass [QSA,L]
RewriteRule ^(((wp-content|wp-includes)/([A-Za-z0-9\-\_\/]*))|(wp-admin/(!network\/?)([A-Za-z0-9\-\_\/]+)))(\.txt|/)$ /nothing_404_404?putyo_hide_my_wp=pass [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Pagination work’s fine with categories and tags, but in main section it redirect to index…
-
This reply was modified 10 years by
websystems.
I second for this option to be displayed at specific post elements and/or percentage down the page. I have some articles that are 300 words and other that are 2,500 words. You don’t want your reader having a blaring sidebar coming from right field when they are in a middle of a read. Definitely consider it for a future update. Hope more people chime in with Siraj & me.
-Jesse M.
Hi
Please make sure you added the css exactly as it is, also remove any other css code (if you have one), make sure you clear all caches, browser cache too and test again. If you made any customization please make sure that the code it’s added properly, for example check if there are any characters which may affect it: http://screencast.com/t/hgDgvFpZsI
Let me know how it goes and if the problem persist please provide a screen from theme panel > custom css area so I can provide a more accurate solution.
Thanks!
Hello,
how can I change the background Color of Post Template Style 6?
I wan’t to change the background on the left and right from white to black.
Here an example post link:
http://awayfromlife.com/el-monstro-ep-stream-und-interview/
Thank you!
thanks a ton Bogdan..You are a rockstar:)
Where exaxctly i can get the RSS feed for the site(www.wizoid.com). If the theme doesnt have this option, Could you please suggest some way to get RSS feed for our site.
Thanks so much for your time & help.
Best,
Pandian
Thank you Chris, it helped.
One more question:
Is it possible to change or hide this one?
var td_ajax_url=”http:\/\/www.mydomain.com\/wp-admin\/admin-ajax.php?td_theme_name=Newspaper&v=6.4″;
I mean th_theme_name NEWSPAPER &v=6.4 ?
Hi,
I have also checked this using header style 9(full logo) and did not found any issue, it display the full image, please check – http://screencast.com/t/qjqSOdPY – http://screencast.com/t/GG0vI8Xd There is no specific css like on style 1 for example which was designed to have the logo and the header ad side by side and it needs css code for this.
Thanks!
I updated to the 2.2 version and am still seeing the pubdate and time W3 validation errors on post pages… I would actually like to get rid of the time/date stamp for comments completely. so that like this does not show in the page code at all:
<time pubdate="1338125656">May 27, 2012 at 7:34 am</time>
-
This reply was modified 10 years by
dallenharris.
Check the page for java errors if FB says no errors.
If the OG tag for image is set correctly, then they should grab the right one. You can look at your page source to verify the right image is set.
I often have issues with FB and have to use the ‘force refresh’ tool on each post at least couple times a day. Super annoying.
Not like we’re paying them to grab our stuff, so support is non-existant, sadly.
I know there was an issue with duplicate “image” tag in some versions of theme, so again check your page source for what is actually there to ensure no duplication, missing item, or bad file name, etc.
For example FB would have trouble with “my%20file%20name.jpg” —
they also have issues with png files it seems.
Basically, just change it.
Be sure the theme is not active; rename theme folder (generally you would do this on your PC/Mac prior to upload via FTP).
For example we change the name of our folder to our news network name.
Just change it from /Newspaper/ to something like /StyleBaron/ or whatever you website name happens to be — be careful NOT to name it the same as a category, post, plugin name, or WordPress function, just to be safe — like, don’t name it VisualComposer for example, or JetPack if you’re using jetpack, is tempting fate! hypehen and underlines can be used, like my-cool-mag … although I’d likely limit to 2 words, no reason you can’t do more.
If using a child theme you likely might need to check the style.css to make sure it points to the right place. I don’t use child themes, so if you don’t then it won’t apply to you either.
There is also an awesome resource called Google for many things like this — WP has been around over 10 years, so this is a very common question you can often answer yourself vs waiting for a reply here — not that anything wrong with that, or looking for pointers here from others who have already done the deed. 🙂
(pardon typos; this keyboard starting to die as is my brain …)
-
This reply was modified 10 years by
simchris.
Is it possible to change Newspaper folder name, for example “mydomain”? If I simple rename folder name, it doesn’t load web, I guess its logical.
The main point to change folder name is then you view “View page source” it’s showing Newspaper name. So I want to change it or hide.
Thank you
Hi
By installing the child theme as it is in /code folder the parent theme functionality won’t be affected because all theme’s files are in main theme. The child theme become useful if you want to customize a post template for example, you will move the required files and the changes won’t be affected by futures updates. In fact this is the point of a child theme, to keep the customization even if the main theme it’s updated. But this is not always valid, because once in a while the child theme it’s also updated, or if the main theme pass through a major update it’s possible that some customizations not work well anymore. There is no reason to install the child theme unless if you decide to customize the parent theme. Note that customizing a theme involve good coding skills otherwise its functionality will be damaged rather than improved.
You can check in documentation which file can be edited with child theme: https://forum.tagdiv.com/the-child-theme-support-tutorial/
Hope this help.
Thanks for the message!
Hi maxim,
You said above that you need to fix only one widget, so I provided a solution how to fix only one widget on the page. For example if you add the class on the row – http://screencast.com/t/5k1Zo7RJkX that block will be sticky – http://screencast.com/t/yBfS6gqp – http://screencast.com/t/2EWAcYm5O
The theme doesn’t have an option to fix only a specific widget from the sidebar like the Q2W3 Fixed Widget plugin and we did not test it with the theme so it may be a conflict. You can try to disable all your plugins except of Visual Composer and Q2W3 Fixed Widget, clear cache and see if it works. It may be a conflict with another plugin.
Thanks!
Hi,
You can add this code under the other part and it should fix the font when zoomed in
.mfp-bottom-bar {
font-size: 15px;
As for the revolution slider, make sure you select the right examples/demos to load.You need to load the ones from v5 (if you have this version). First you must create a new slider. Next find the import/export section below the main slider settings. Click “Choose File” button and select your zip file then click “Import”.
You will find this slider exchange site very usefull:
http://revolution.themepunch.com/free-slider-exchange/
Thank you!
Code:
<?php
$theShortcode = '[vc_row][vc_column][td_block_15 custom_title="Related Articles" td_ajax_filter_type="td_category_ids_filter" ajax_pagination="next_prev"][/vc_column][/vc_row]';
echo do_shortcode($theShortcode);
?>
This works fine (apart from an issue with the category box dropping a few pixels which I have raised in another post). However there’s no option to filter based on post ID like you can with the Post Grid/Post Masonry Grid options. Is there a simple enough way to achieve this here?
I’d love to use Post Grid/Post Masonry Grid in the above example but unfortunately as per the plugin authors reasoning:
Currently it is not possible because Grid requires special hashkey which is stored in meta data of the each post. Each hashkey is unique and related to information in meta about grid attributes. The reason of such implementation is security. Because vc getting data grid from ajax request and data passed to this request is ID.
Hi sesantanajr,
I have checked your site and some of your images are cropped, but they don’t have width and height, for example – http://screencast.com/t/Cmfz8ZNJUNJ it should look like this – http://screencast.com/t/uPWhut4R
Each featured image is cropped to a specific size, here you can see the thumbs used on modules – http://screencast.com/t/9xmQZoZFrGR and the code is located in td_config.php file – http://screencast.com/t/c7LeWSH7p3VK
You have to use Thumbnail Upscale and Force Regenerate Thumbnails only if you use smaller images than the thumb size on modules/block. If the images are not cropped you will have just to regenerate thumbnails – https://forum.tagdiv.com/using-the-theme-with-existing-content/
Did you modified the code? Please remove your custom modifications or try to so a clean install then check again without any plugins active, leave just Visual Composer active, clear cache and see if you still have this issue after you regenerate the thumbs.
Yesterday when I have checked your site the thumbs were cropped to the specific size. The theme doesn’t use the full size image on modules, I have just provide more details in the documentation how the theme creates the thumbnails and how to change the cropping mode if you want this.
Thanks!
Example URLs: http://beta.virtualfestivals.com/uncategorized/164812/ and http://beta.virtualfestivals.com/event/reading-festival-2015/
Specifically on the 2nd one, the category title seems to have dropped down a few pixels. It’s a custom post using the do_shortcode function
Shortcode:
[vc_row][vc_column][td_block_15 td_ajax_filter_type="td_category_ids_filter" ajax_pagination="next_prev"][/vc_column][/vc_row]
Any advice? Also, any advice on how to filter posts based on post ID e.g. only show posts with ID 1,5,6…,488
Thanks
Hello,
You can change the tab colors from visual composer:
http://screencast.com/t/bD0X3JqC – http://screencast.com/t/qYf6QxC5
If you mean the title of the tabs not the tabs themselves, you need to use custom css to style the H2 title of the block. You can target the h2 inside the container using child selectors and apply your styles to it.
Example:
.vc_tta-container > h2{
color:red;
background-color:green;
display:table;
padding:8px
}
If this is not what you mean, provide more details so i can better understand how to help.
Thank you.
Hi – I’ve just purchased Newspaper and am investigating whether it will support all the customisations I have built with my current theme.
One aspect that isn’t working as expected is I have some custom post content that is configured using the Toolset group of plugins.
You can see how it outputs using my current theme here.
This is how the same page outputs using Newspaper:
I obviously haven’t configured the logo, menus and sidebar, but my concern is that none of the custom post content is visible, except for the title.
The Toolset support have said the following:
It might also be possible that you need to induce your View with PHP:
https://wp-types.com/documentation/user-guides/views-api/But that should not be necessary if your theme is coded with the WP Standards.
https://wp-types.com/home/compatibility-toolset-plugins-themes/
Whenever I’ve previously tested other themes, this content displays automatically.
Please can you advise if there is a way that I can make this work?
Many thanks in advance.
Cheers, Rob
Thank you for your reply.
I guess I need Revolution Slider. But I can’t use any predefined template sliders. It says import from Local or Online, then it does not support any.
Could you guide me how can I load those predefined templates. I have already upload the plugin revslider 5 provided by you last week. I think it has all the examples, but I wonder why I can’t I use them. Do I need to buy from codecanyon, as they say.
Thank you.