- NewsmagHomepage – How to build and set it
- NewspaperHomepage – How to build and set it
- NewspaperHow to edit modules for Flex Block X
- NewspaperGeneral Options that May Interfere with the Newspaper Theme
- NewspaperThe Newspaper Mobile Theme: Introduction
- NewspaperHow to Add a Logo in Newspaper
- NewspapertagDiv Shop
- NewspaperHow to Use tagDiv Cloud Library
- NewspaperDesign your Post Pages using the Cloud Library Templates
- NewspaperHeader Builder
- NewspapertagDiv Cloud Library Plugin
- NewsmagtagDiv Composer Tutorial
- TutorialsFrom WPBakery to tagDiv Composer
- NewspapertagDiv Composer Tutorial
- NewspaperNewspaper theme documentation
- NewspaperThe Mobile Theme
- NewsmagNewsmag documentation
- NewsmagMain menu
- NewsmagLogo & Favicon
- NewsmagPage templates
Hi,
Please replace this file http://www.tagdiv.com/theme/users/page-homepage-loop.zip
My apologies the last set of codes was for Articles with a BG. Please see the following code that should reflect what you requested that I do. I am still having a problem on this page when I make your amendments.
<?php
/* Template Name: Homepage – with article list */
get_header();
td_global::$current_template = ‘page-homepage-loop’;
global $paged, $loop_module_id, $loop_sidebar_position, $post, $more; //$more is a hack to fix the read more loop
$td_page = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1; //rewrite the global var
$td_paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; //rewrite the global var
//paged works on single pages, page – works on homepage
if ($td_paged > $td_page) {
$paged = $td_paged;
} else {
$paged = $td_page;
}
$list_custom_title_show = true; //show the article list title by default
$td_homepage_loop_filter = ”; //homepage loop filter metadata
/*
read the settings for the loop
—————————————————————————————- */
if (!empty($post->ID)) {
td_global::load_single_post($post);
//read the metadata for the post
$td_homepage_loop_filter = get_post_meta($post->ID, ‘td_homepage_loop_filter’, true); //it’s send to td_data_source
$td_homepage_loop = get_post_meta($post->ID, ‘td_homepage_loop’, true);
if (!empty($td_homepage_loop[‘td_layout’])) {
$loop_module_id = $td_homepage_loop[‘td_layout’];
}
if (!empty($td_homepage_loop[‘td_sidebar_position’])) {
$loop_sidebar_position = $td_homepage_loop[‘td_sidebar_position’];
}
if (!empty($td_homepage_loop[‘td_sidebar’])) {
td_global::$load_sidebar_from_template = $td_homepage_loop[‘td_sidebar’];
}
if (!empty($td_homepage_loop[‘list_custom_title’])) {
$td_list_custom_title = $td_homepage_loop[‘list_custom_title’];
} else {
$td_list_custom_title =__td(‘LATEST ARTICLES’);
}
if (!empty($td_homepage_loop[‘list_custom_title_show’])) {
$list_custom_title_show = false;
}
}
echo td_page_generator::wrap_no_row_start();
/*
the first part of the page (built with the page builder) – empty($paged) or $paged < 2 = first page
—————————————————————————————- */
/*
the main fake loop
—————————————————————————————- */
$more = 0; // fix read more
echo ‘<div class=”row-fluid”>’;
switch ($loop_sidebar_position) {
case ‘sidebar_left’:
?>
<div class=”span4 column_container” role=”complementary” itemscope=”itemscope” itemtype=”http://schema.org/WPSideBar”>
<?php get_sidebar(); ?>
</div>
<div class=”span8 column_container” role=”main” itemprop=”mainContentOfPage” itemscope=”itemscope” itemtype=”http://schema.org/Blog”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<?php
break;
case ‘no_sidebar’:
?>
<div class=”span12 column_container” role=”main” itemprop=”mainContentOfPage” itemscope=”itemscope” itemtype=”http://schema.org/Blog”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<?php
break;
//sidebar right
default:
?>
<div class=”span8 column_container” role=”main” itemprop=”mainContentOfPage” itemscope=”itemscope” itemtype=”http://schema.org/Blog”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
//
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<div class=”span4 column_container” role=”complementary” itemscope=”itemscope” itemtype=”http://schema.org/WPSideBar”>
<?php get_sidebar(); ?>
</div>
<?php
break;
}
wp_reset_query();
if(!empty($post->post_content)) { //show this only when we have content
if (empty($paged) or $paged < 2) { //show this only on the first page
?>
<div class="row-fluid">
<div class="span12 column_container" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
//read the page settings
the_content();
endwhile; //end loop
}
?>
</div>
</div>
<?php
}
}
echo ‘</div>’; //close the .row
echo td_page_generator::wrap_no_row_end();
get_footer();
?>
Many thanks for the reply Marius. I did update the code and unfortunately it get a blank white page. Please see below. Also, I am using the Home Page – with Article List. I sincerely do appreciate your help here.
<?php
/* Template Name: Homepage – bg + with article list */
get_header();
td_global::$current_template = ‘page-homepage-loop’;
global $paged, $loop_module_id, $loop_sidebar_position, $post, $more;
$td_page = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1; //rewrite the global var
$td_paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; //rewrite the global var
//paged works on single pages, page – works on homepage
if ($td_paged > $td_page) {
$paged = $td_paged;
} else {
$paged = $td_page;
}
$list_custom_title_show = true; //show the article list title by default
$td_homepage_loop_filter = ”; //homepage loop filter metadata
/*
read the settings for the loop
—————————————————————————————- */
if (!empty($post->ID)) {
td_global::load_single_post($post);
//read the metadata for the post
$td_homepage_loop_filter = get_post_meta($post->ID, ‘td_homepage_loop_filter’, true); //it’s send to td_data_source
$td_homepage_loop = get_post_meta($post->ID, ‘td_homepage_loop’, true);
if (!empty($td_homepage_loop[‘td_layout’])) {
$loop_module_id = $td_homepage_loop[‘td_layout’];
}
if (!empty($td_homepage_loop[‘td_sidebar_position’])) {
$loop_sidebar_position = $td_homepage_loop[‘td_sidebar_position’];
}
if (!empty($td_homepage_loop[‘td_sidebar’])) {
td_global::$load_sidebar_from_template = $td_homepage_loop[‘td_sidebar’];
}
if (!empty($td_homepage_loop[‘list_custom_title’])) {
$td_list_custom_title = $td_homepage_loop[‘list_custom_title’];
} else {
$td_list_custom_title =__td(‘LATEST ARTICLES’);
}
if (!empty($td_homepage_loop[‘list_custom_title_show’])) {
$list_custom_title_show = false;
}
//adds the filters for templates: ‘Homepage – with article list’ and ‘Homepage – bg + article list’
//include_once(‘includes/wp_booster/td_homepage_loop_filter.php’);
}
/*
big slide
—————————————————————————————- */
locate_template(‘parts/page-homepage-slider.php’, true);
echo td_page_generator::wrap_no_row_start();
/*
the content if we have one
—————————————————————————————-
02/06/2014 – Disabled this code ITPS Trevor
if(!empty($post->post_content)) { //show this only when we have content
if (empty($paged) or $paged < 2) { //show this only on the first page
?>
<div class=”row-fluid”>
<div class=”span12 column_container” role=”complementary” itemscope=”itemscope” itemtype=”http://schema.org/WPSideBar”>
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
//read the page settings
the_content();
endwhile; //end loop
}
?>
</div>
</div>
<?php
}
}
*/
/*
the main fake loop
—————————————————————————————- */
$more = 0; // fix read more
echo ‘<div class=”row-fluid”>’;
/*
//do the loop
$queryPost = Array(
‘posts_per_page’ => get_option(‘posts_per_page’),
‘paged’ => $paged
);
//hide featured categories
if ($td_featured_posts != ‘show_featured_posts’) {
$queryPost[‘cat’] = ‘-‘ .get_cat_ID(TD_FEATURED_CAT);
}
*/
switch ($loop_sidebar_position) {
case ‘sidebar_left’:
?>
<div class=”span4 column_container”>
<?php get_sidebar(); ?>
</div>
<div class=”span8 column_container”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<?php
break;
case ‘no_sidebar’:
?>
<div class=”span12 column_container”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<?php
break;
//sidebar right
default:
?>
<div class=”span8 column_container”>
<?php if ((empty($paged) or $paged < 2) and $list_custom_title_show === true) { ?>
<h4 class=”block-title”><span><?php echo $td_list_custom_title?></span></h4>
<?php }
query_posts(td_data_source::metabox_to_args($td_homepage_loop_filter, $paged));
get_template_part(‘loop’, ‘simple’);
echo td_page_generator::get_pagination();
?>
</div>
<div class=”span4 column_container”>
<?php get_sidebar(); ?>
</div>
<?php
break;
}
wp_reset_query();
if(!empty($post->post_content)) { //show this only when we have content
if (empty($paged) or $paged < 2) { //show this only on the first page
?>
<div class="row-fluid">
<div class="span12 column_container" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
//read the page settings
the_content();
endwhile; //end loop
}
?>
</div>
</div>
<?php
}
}
echo ‘</div>’; //close the .row
echo td_page_generator::wrap_no_row_end();
get_footer();
?>
Hi,
Delete this code from here: http://screencast.com/t/Z3tGAAxvw
Scroll down in that file and add this code here: http://screencast.com/t/1PMe9ko4
wp_reset_query();
if(!empty($post->post_content)) { //show this only when we have content
if (empty($paged) or $paged < 2) { //show this only on the first page
?>
<div class="row-fluid">
<div class="span12 column_container" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar">
<?php
if (have_posts()) {
while ( have_posts() ) : the_post();
//read the page settings
the_content();
endwhile; //end loop
}
?>
</div>
</div>
<?php
}
}
This is for Homepage – with article list template
Thanks for the message!
Sorry, 15px between menu header and slide on homepage for exemple.
thanks Marius
The review overview box is now gone – thanks 🙂
How do I remove the stars from the homepage?
thanks again
Andrew
Hello,
Ups, sorry, when you have changed to 1-5 point, I forgot to tell you how to make the stars to, change here: http://screencast.com/t/2bdNBa2gZw to fix the star.
Do you still need to remove them from homepage, if now will work correctly?
To remove that, please add this in CSS panel.
.td-review-header {
display: none;
}
.td-review {
margin-top: 0px !important;
}
Thanks for the message!
Hy Marius,
Thank you for the Tip. I have done that and now the homepage looks beautiful!
Have a wonderful day!
Hi Maqabyah – Go to “Pages” in your wordpress admin area and edit the page that you have set as the homepage.
Scroll all the way to near the bottom and there is an option called “Show Only Unique Articles on this Template” The default is “Disabled.” Change that to “Enabled” and it should prevent the duplicates.
This is a new feature in Version 3 to prevent duplicate content, so that’s probably why it happened when you upgraded since the default is “Disabled”
In your own tutorial: https://forum.tagdiv.com/ads/
There you mention the possibility of custom ads. This is what I really need.
The other ‘custom’ spots you mention are not so custom. They have a fixed position.
For instance there’s only 1 sidebar option now. I used to have different ads for different pages in the sidebar. Also I used a 980px ad on the homepage, just the homepage. Now it’s one which is used in all posts after 2nd paragraph.
Perhaps I don’t fully understand your new ad setup… please explain then. Otherwise please provide an option to add custom ad spots.
Thanks!
thanks Marius
re answer 5 – I don’t want any review stars to appear on the homepage ever – how can I remove them, especially as they don’t actually correspond to whatever score is given?
thanks
Andrew
Hello,
To activate the unique article system, edit you homepage and enable it from there. Now you should have no duplicate post on the entire page.
Thanks
Hello
Please update to 3.0.1 we fixed the Speed Booster issue.
The ad system have some default size defined, if you want to change it go here and edit: http://screencast.com/t/2IcocCo2
We will add this to be changed directly from Theme panel. We built the ad system with easy of use in mind.
To activate the unique article system, edit you homepage and enable it from there. Now you should have no duplicate post on the entire page.
Thanks for the message!
How to avoid videolink to be displayed on homepage with posts?
Healthy Recipes: Grilled Thai Beef Salad
Feb 3, 20140 1
http://www.youtube.com/watch?v=9Z2gj2cvrMk
hi,
i have tested (http://demo.tagdiv.com/newspaper/ – homepage) on samsung s4 and i can’t see the slider having problems, can you provide a link
Thanks for you message.
Radu A.
Hello,
Load more option is from Blocks. You use a module there. Blocks are built from modules, see here: https://forum.tagdiv.com/modules-and-blocks/
We will make all modules to be available in page builder(visual composer) this week.
Thanks for the message!
Hello,
Modules are used for pagination(next/prev)
Blocks from page builder(visual composer) are built from modules and have those option: http://screencast.com/t/rRCxxwPvVCS but don’t have pagination.
See here a diagram: https://forum.tagdiv.com/modules-and-blocks/
Here are all block http://screencast.com/t/dIWpNOKu5E files.
Thanks or the message!
Modules can be used on loops, on homepages with pagination(latest article), on category template, search templates, blog template, etc.
That can’t be used in visual composer, only with custom modification.
You can use Blocks with page builder, blocks are made from modules see here: https://forum.tagdiv.com/modules-and-blocks/
Thanks for the message!
Hello,
1. Change like here: http://screencast.com/t/VAfrzkRJd4
2. Only with custom modification, we have this on the todo list for following updates, but is not with high priority.
3. Yes, in this file this line echo the review, you can move the code where you want.
4. You can hide the attribute and keep only the final score, comment this line like here: http://screencast.com/t/53Cs8AeznV or you can use just a single attribute for ratting. All the code is in that file if you want to play with it.
5. You want to hide the review stars from the homepage? The stars are from 1-5, no matters that you are use points(will not show 1-10 stars) or for percent will not show (1-100 stars)
Thanks for the message!
hi,
go to pages -> new,
add a name to your page then hit the Visual composer button
then hit Add Element button : http://screencast.com/t/WdPi3NXXlm
then from the filter window : http://screencast.com/t/5IqSzavFRk
then : http://screencast.com/t/H8n8FtnxrU7
then hit publish, an then update button : http://screencast.com/t/sevj77V2Go
result:
http://screencast.com/t/DqcD6jmA7cE
http://screencast.com/t/kGHKv5CvfRwk
Thanks for you message.
Radu A.
I figured it out
Please close this post.
How to make my website look like homepage 4 in demo?
Please add screenshots of you settings
Hello, I am having problems getting my pagination to change from ‘Next-Prev’ to ‘Load More’. You can see my issue here:
http://kushca.com
I just want to load more instead of going to a next page. How do I implement this?
I figured it out by just creating a new homepage. Now I am having problems getting my block three to display in module 7 form. Grr
Hello. I am having issues getting Load More pagination on my homepage, instead of next-prev page. Can any one point me in the right direction. Any help would be much appreciated.