- NewsmagPage templates
- NewsmagCategory templates
- NewsmagFooter templates
- NewsmagDefault post templates
- NewsmagPost templates
- NewsmagHomepage – How to build and set it
- NewsmagtagDiv Composer Tutorial
- NewsmagCustom Post Type Support
- NewsmagNewsmag documentation
- NewsmagHow to use the Visual Composer plugin
- NewsmagHeader styles
- NewsmagSmart sidebar
- NewsmagCategory grid styles
- NewsmagCategory top post styles
- NewsmagHow category settings work
- NewsmagFeatured images
Hi,
I need to organize homepage into sections (it’s not enough for me organize only for categories).
I do not want to use a second category for it. It ‘will be a configuration to help me to organize content into sections and not for the respective categories?
For example …. I configure a box in the home with a certain layout and I want in that box there is always a content of a particular type (or a content that i choose but not by category…..the classical example of featured post).
I think is improper use other categories to create this parallel organization .
I thought that I can use the tags (I saw that in filters of the boxes of this template can only filter or by category or tags, and not for a custom taxonomy) in the sense that I would use the tags only to define the various sections of the home but then lose the proper use of tags that I should replace them with custom taxonomy.
If anyone can help me clarify the issue I would be very grateful.
ok, i see on internet that my code is not good,
Right?
Now my code is :
function wp_styles_reservation() {
wp_register_script('jslider', get_stylesheet_directory_uri() . '/assets/css/jslider.css');
wp_register_script('style01', get_stylesheet_directory_uri() . '/assets/css/style01.css');
wp_register_script('counter', get_stylesheet_directory_uri() . '/assets/js/counter.js');
wp_enqueue_style( 'jslider' );
wp_enqueue_style( 'style01' );
wp_enqueue_style( 'counter' );
}
add_action('wp_enqueue_scripts','wp_styles_reservation');
But it still doesn’t work.
My Stylesheet not apply on the css i use on the Page i create from “WordPress Page”.
Any idea?
Thanks in advance
Hi,
I am using Newspaper 6 Theme.
On category pages we have filter passed in query string which is post tag. So want to filter my posts according to that query string tag.
So I have changed query successfully which is effecting results of main category pages content. On loop.php modifying query with post tag make desired results. (In child theme)
But when it comes to top grid, it is hard-cord value of 5 passed there and if posts with tag are not present it displays nothing.
I found this piece of code which is calling Top grid :
<?php td_api_category_template::_helper_show_category_template() ?>
<?php td_api_category_top_posts_style::_helper_show_category_top_posts_style() ?>
And there is main function in File: /Newspaper/includes/wp_booster/td_wp_booster_functions.php
/* ----------------------------------------------------------------------------
* modify the main query for category pages
*/
add_action('pre_get_posts', 'td_modify_main_query_for_category_page');
function td_modify_main_query_for_category_page($query) {
//checking for category page and main query
if(!is_admin() and is_category() and $query->is_main_query()) {
//get the number of page where on
$paged = get_query_var('paged');
//get the filter_by
URL($_GET) variable
$filter_by = get_query_var('filter_by');
<strong> $query_tag = filter_input( INPUT_GET, 'tag', FILTER_DEFAULT );
if($query_tag)
$query->set('tag',$query_tag); /*<strong>I tried modifying query but it does not effect top posts*/</strong>
//get the limit of posts on the category page
$limit = get_option('posts_per_page');
// get the category object - with or without permalinks
if (empty($query->query_vars['cat'])) {
td_global::$current_category_obj = get_category_by_path(get_query_var('category_name'), false); // when we have permalinks, we have to get the category object like this.
} else {
td_global::$current_category_obj = get_category($query->query_vars['cat']);
}
//offset is hardcoded because of big grid
$offset = td_api_category_top_posts_style::_helper_get_posts_shown_in_the_loop();
//echo $filter_by;
switch ($filter_by) {
case 'featured':
//get the category object
$query->set('category_name', td_global::$current_category_obj->slug);
$query->set('cat', get_cat_ID(TD_FEATURED_CAT)); //add the fetured cat
break;
case 'popular':
$query->set('meta_key', td_page_views::$post_view_counter_key);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'popular7':
$query->set('meta_key', td_page_views::$post_view_counter_7_day_total);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'review_high':
$query->set('meta_key', td_review::$td_review_key);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'random_posts':
$query->set('orderby', 'rand');
break;
}//end switch
// offset + custom pagination - if we have offset, WordPress overwrites the pagination and works with offset + limit
if(empty($query->is_feed)) {
if ( ! empty( $offset ) and $paged > 1 ) {
$query->set( 'offset', $offset + ( ( $paged - 1 ) * $limit ) );
} else {
$query->set( 'offset', $offset );
}
}
}//end if main query
}
While using Grid style one:
includes/shortcodes/td_block_big_grid_1.php
POST_LIMIT is passed as 5.
So is there any way that my category posts get filter by tag for top grid as well. I tried modifying main function as mentioned above. Please see this comment in code above (I tried modifying query but it does not effect top posts)
Please suggest how that will be possible.
Screen shot attached for details of URL having query string:
I followed these steps below to create more custom add boxes:
Edit td_config.php and add it like this: http://screencast.com/t/LjL18ZfbL Then just make add it in td_panel_ads.php file – http://screencast.com/t/UB3dwNgI68
Now you can add your code in Theme Panel > Ads – http://screencast.com/t/z3ROmJFEL and display it in your page – http://screencast.com/t/aNBwX5azB
The result was it broke my website, creating this error: Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /home/mauimagazine/www/wordpress/wp-content/themes/Newspaper/includes/td_config.php on line 2006:
I overwrote the file to fix the website, but I was hoping you can help me successfully add more custom ad boxes without breaking the website.
Thank you!
UPDATE: Actually it turns out I broke it a bit worse than I realized — my Ads section on the theme template is broken, saying: Parse error: syntax error, unexpected T_STRING in /home/mauimagazine/www/wordpress/wp-content/themes/Newspaper/includes/panel/views/td_panel_ads.php on line 1113
That is the most urgent fix I need now 🙁
-
This reply was modified 10 years by
Maui No Ka Oi Magazine.
At first I was importing stylesheets putting in the style.css of my child-theme, @import url (“css / nameofmystyle.css”), it works but…
I see all over the web that the method is wrong.
that I must use the function file.
So I created a css and js folder in my child theme.
in the css folder I put style01.css and style02.css
and in the js folder and I put style01.js and style02.js
I’m looked on the internet and tried many method I found, but I do not get called my css and js file I need for the static content of certain pages.
my function.php file is at the moment like this:
<?php
/* ----------------------------------------------------------------------------
Newspaper 6 Child theme - Please do not use this child theme with older versions of Newspaper Theme
What can be overwritten via the child theme:
- everything from /parts folder
- all the loops (loop.php loop-single-1.php) etc
- the rest of the theme has to be modified via the theme api:
https://forum.tagdiv.com/the-theme-api/
*/
/* ----------------------------------------------------------------------------
add the parent style + style.css from this folder
*/
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1000);
function theme_enqueue_styles() {
wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', '6.1c', 'all' );
wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), '6.1c', 'all' );
}
Thank you in advance for your help again
Hi there,
Would like to make a few adjustments to the template ‘Pagebuilder + Title’ that I use on several pages.
1. I would like to get rid of the border / horizontal line that is now displayed below the Title when you use this template. I do not want it to have any extra spacing or element there.
2. Is it possible to get the title do be displayed in the horizontal center instead of on the left?
3. Can we increase the font size of the title because a H2 heading is larger in font then the title, which I do not really like. To me the font sizes should be appropriate to the heading (Title H1 being the largest all the way to H6 being smaller.
Thanks!
NM-User
I am facing same problem,I can’t make same Travel template for my website:So i was posted here https://forum.tagdiv.com/topic/how-can-i-make-same-homepage-like-travel/ and I have tried your instruction but failed.
You don’t mention how to add 3 Box like travel template showing.Please clear me step by step how to create same home like TraveL?
If possible make a video tutorial.
Hello,
You can ad a slider to your homepage using visual composer: http://screencast.com/t/6EuIgbAC
You can follow this tutorial to see how to use it: https://www.youtube.com/watch?v=ss-BEobegAw
The footer section cannot be edited as the footer style you chose comes with predefined content. You can select a different footer style that does not contain content. Anything other than the fisrt 2 styles: http://screencast.com/t/eeITZ1vjCr – then you can use the footer 1, footer2 and footer3 widgets to place content inside the footer: http://screencast.com/t/Y9GnTxgOtK0
You can read mkore about footers here: https://forum.tagdiv.com/footer-templates/
As for the sidebar widget, you can edit it from the widgets area. you will need to identify which sidebar is used and edit it’s settings (including title): http://screencast.com/t/illS57ji
I hope this helps
Thank you!
ok thanks right i dont have good coding skill, maybe i will search an other template in wordpress where i dont need to change them. I thought it was not complicated as the home page. Think to add this kind of option like home page in the futur it was great i think for many people
Have a good day
Hi
Your code is missing the loop part which check if there are any post to be displayed on the page. A basic loop example it’s in this code:
<?php if ( have_posts() ) ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="td-container"> //the theme uses this classes for
<div class="td-container-border"> //post/page content
<?php the_content(); ?>
//you can place a custom code here, depending by your needs
</div>
</div>
<?php endwhile; ?>
The theme display the page content using this classes: td-container, td-container-border You can replace them if you want but in this case you need to create your own css for layout. Also you can use your classes within theme’s classes like this:
<div class="td-container"> //the theme uses this classes for
<div class="td-container-border"> //post/page content
<div class="img-header-home">
<div class="container mt-130 z-index100">
My static content
<?php the_content(); ?>
//you can place a custom code here, depending by your needs
</div>
</div>
</div>
</div>
You can check this example code here: http://pastebin.com/8E0XZ8de which produce this result: http://screencast.com/t/p8SsR9P2x9W – http://screencast.com/t/N95ikdPhHY
This is a basic example, but you can customize your page template as you need by ading different conditions in that file. For more information regarding WordPress loops you can check the official documentation: https://developer.wordpress.org/themes/basics/the-loop/
Hope this help.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hi luckydog01420,
I understand your problem and for do this changes it is necessary to modify the correct template. For to add in the category pages the ad block, you must put your ad shortcode as like in the screenshot: http://screencast.com/t/j1XAeLSwuy and for individual post pages, here: http://screencast.com/t/yt5vvNDCs – for post pages you must change core files of template used. (single_template_1.php or single_template_2.php… etc).
Hope this helps and let us know how it goes!
Thanks!
Hi, i have a little problem, may be you can help me.
I tried to create a original homapage, or may be just a header fullsize, but it is not the point.
I create a new php file with sublimetext, in that php file i put :
<?php
/*
Template Name: Home
*/
?>
<?php
get_header('home');
//set the template id, used to get the template specific settings - this was the old home.php template
$template_id = 'home';
//prepare the loop variables
global $loop_module_id, $loop_sidebar_position;
$loop_module_id = td_util::get_option('tds_' . $template_id . '_page_layout', 15); //module 1 is default
$loop_sidebar_position = td_util::get_option('tds_' . $template_id . '_sidebar_pos'); //sidebar right is default (empty)
// sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
$td_sidebar_position = '';
if($loop_sidebar_position == 'sidebar_left') {
$td_sidebar_position = 'td-sidebar-left';
}
?>
<div class="img-header-home">
<div class="container mt-130 z-index100">
My static content
</div>
</div>
here
<?php
get_footer();
i put my php file in the hosting where wordpress are installed, and from wordpress, i create a page, and choose from template my php file “Home”.
now under My Content <div class = “img-header-home”> I want to add some dynamic content that retrieves items from my blog.
And if it can be added by visual composer on this page. Because I try to create content with but it does not appear online.
I think something is missing (i mean some code php) to recovered the visual composer tomake it works.
i understand html, css, but not more in php, that’s why i need your help.
i’m sorry my english is bad, I hope u can understand.
Thanks in advance.
Hi,
i need a post template with 3 column
Now i use post template 7
How can i add a new column in left in this tempalte or how can i make a new post template with 3 column.
Can we use visual composer to create new post template , like home page it was really fantastic ?
thanks
Hello,
There are 2 ways to control the sidebars in our theme.
The first one is to use the widgets area: http://screencast.com/t/HcrgyWC0x and set a custom sidebar or edit an existing one. You can create a custom sidebar from the theme panel: http://screencast.com/t/hpspO2CE5xV and it will show up in the widgets area. Here you can add elements from the left side of the screen and configure their settings.
You can assign these sidebars to a post, category or page.
On pages if you use the default template, the sidebar will not show up: http://screencast.com/t/zl9jucvAdB4
The other way is only for pages, you can use visual composer to create another column to your content and add widgets to it: http://screencast.com/t/QmhxmLZulH7
You can read more about these settings in our documentation: https://forum.tagdiv.com/sidebars-tutorial/
https://forum.tagdiv.com/how-to-use-visual-composer/,
I hope this helps
Thank you!
I’m not quite understanding what you are suggesting. Here are my current settings:
http://screencast.com/t/ZMfN5OqUZ
http://screencast.com/t/bi9tZxXN
Please advise as to how I can have a total of 8 slides between two main slides on my home page. I have gone through every single Sort Order option and none of them work as expected.
Also, one of the other major issues that I’m having is that all of my post templates are now wrong. They are all now Style 4, but I need them to be Style 7. I’ve got about 4000 posts, how can I fix this? I’ve tried setting the post default template to Style 7, but that doesn’t fix this.
-
This reply was modified 10 years by
ned4spd8874.
Hi
First of all your site is set to display the latest article not a static page. If you want to change that go at Settings > Readings and chose a static page to be displayed as front page: http://screencast.com/t/VSDcbdz7tP If you want to change the post template for the blog page, that can be done from theme panel > template settings: http://screencast.com/t/4p9bgL2DAS
Also you can check our documentation for more information about page templates and how to personalize the homepage: https://forum.tagdiv.com/homepage-how-to-build-and-set-it/ – https://forum.tagdiv.com/page-templates-2/
We also have some video tutorials on our Youtube channel like this one: https://www.youtube.com/watch?v=TUdVeZ1pbuc&list=PL6CsDkMaejhpWFcFNOIDfdp5nIT0NbUbj&index=1
Hope this help and if you need further instructions please let us know.
Thanks!
Hy byothe,
Yes, it is possible to achieve this thing if you use the code below in template of the page you want to have this Author Box. http://screencast.com/t/ucNirJcW
<?php locate_template(‘parts/page-author-box.php’, true);?>
Hope this helps and let us know how it goes!
Thanks!
Hi
The review graph and rating scores are generated by the same function and can’t be moved separately. You can move the entire review section if you want by editing the file corresponding with the post template used: http://screencast.com/t/4Zqzodfhn However to place the review in the middle of the page for example, you will need custom modification in theme’s core files because the post content (part written in post editor) is added with this a WordPress function: get_the_content() http://screencast.com/t/gcn6Yzmb To insert the review in post content you will need a similar code with the one for article inline ads, which allow you to specify the paragraph after which the ad will be inserted: http://screencast.com/t/UATxoSg8m
This is a complex task and I can’t provide a solution now. If you need this and you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer to do this for you as we can’t offer custom services for the moment.
Thanks for the message!
Hi,
If you refer to the meta info from post page, you will have to edit the template that you use and move the meta above the title – http://screencast.com/t/yvcrwIg1N
If you refer to modules, you will have to change it for modules that you use – http://screencast.com/t/aMeL4O2XjN
Here you can make an idea what modules are used on blocks – http://screencast.com/t/gUhzVeqN65q
Thanks!
Hi developers,
I want to refresh my all entire page (ı don’t like slide thing) when ı click “next” button in smartlist 1 template, is this possible to do?
After latest update images are showing much smaller. I have tried updating all plugins etc but nothing helps 🙁 http://i67.tinypic.com/2uzfek4.png
help.
_________________________________________________________________
Hi,
I’m not sure how they looked before or why they look smaller now however you could try to adjust them using custom css code, like this: http://screencast.com/t/aY1CnyqMfy7
.vc_figure {
width: 100%;
margin: auto;
}
Hope this helps! Let us know how it works!
Thanks! Lucian C. tagDiv!
________________________________________________________________
i did add this code on costum css part on the template but didtn help 🙁 All pages are now like this and i dont undrestand why. can i send you an pm with access details so you can check?
Hi there,
I followed Chris’ custom optimization and noticed he removed the VC css on single templates.
I decided to try and apply it site wide and so far seems even the home page loads properly. And I’m sure I used VC to build the home page as well as the category pages.
So what gives… Is the VC’s CSS only used for admin purposes?
Cheers!
Documentation says there is top bar templates folder in the panel directory but there is no images at all for setting up the api. So that does not work without the images anyways. So I am just going to give up on this and not even bother with the api since there is no images to even work with for the top bar.
LOL! I am stupid! I just read the text on the top bar settings on top and it says “The top bar is the black top menu. It is very useful when you want to add a login option, social icons and pages like About us, Contact us etc… If you are an advanced user and want to customize it or register new top bar layouts, have a look at our top bar template API”.
So basically the API is only for the advanced users and I should be able to see the weather on top right with it enabled anyways. Just don’t have a templates added for top bar. So if I just enable and wait it refreshes the weather for the top bar? Em I correct on that?
-
This reply was modified 10 years by
doucare1971.
Hello,
You can create your own page template in the root of the theme and copy the code from page.php(default template) and just add this comment instead – http://screencast.com/t/UdDaIQhr It should appear on template options – http://screencast.com/t/cONiVSlbjH7 Then add your custom modification to the code. You can copy the ajax search code here and use the page template where you want to use the ajax search pages. You can find the ajax search code here: http://screencast.com/t/BRyjYxHu
It will require some adjustments in order to work properly, but this should help guide you in the right direction
Thanks!
Hi,
You use Pagebuilder with Latest Articles template on your homepage. The Latest articles section(loop) can be controlled from here(module, filter options, custom sidebar) – http://screencast.com/t/ZZAjKwvHen – http://screencast.com/t/PZ755IB8u
If you don’t need this section and you want to display only the pagebuilder content for your homepage, you can change to default page template – http://screencast.com/t/EAtGOLniytrc
Please check documentation – https://forum.tagdiv.com/page-templates-2/ and also we have some vide tutorials on our Youtube channel like this one – https://www.youtube.com/watch?v=rgWqozuqmJk
Thanks!