- NewsmagPage templates
Hi,
Could I config load style of latest posts on each page to indefinite instead of pagination?
I could not find any option to load posts under POST LOOP SETTING.
Thanks,
Steve
Hi,
Unfortunately the load more or infinite load pagination can’t be implemented for loops or post pagination.
If you need another implementation for the latest articles section you can try this functions: http://codex.wordpress.org/Function_Reference/next_posts_link and add them using an div tag on the template you use on your homepage and replace this: http://screencast.com/t/7DlGd290CLB
You can find more details here: https://forum.tagdiv.com/topic/how-just-make-next-and-prev-next-on-pagination/#post-24385
Hope this helps!
Thanks
Hi,
The smart sidebar was designed to work on theme posts, page content when td-ss-row class is added to the row that you want to make sticky and also on loop(latest articles, categories…) Unfortunately it was not tested with custom post types so I cannot make any recommendations for this, sorry! We plan to improve and add better support for the custom post type in a future update.
Thanks!
Hi,
You can use theme’s blocks for this or a page with the latest articles section template and set the loop filter to random posts, like this: http://screencast.com/t/oDNA1pysB or blocks settings to filter posts from all categories and set the sort to random posts like this: http://screencast.com/t/sMtISHGU7
You can find an more detailed info of our blocks settings here: https://forum.tagdiv.com/block-settings-overview/ and these are theme’s blocks: https://forum.tagdiv.com/blocks/ and these are the available page templates: https://forum.tagdiv.com/page-templates-newsmag/
Let us know how it goes!
Thanks
I have a really strange thing here. My posts are all set to style9, and I copied single_template_9.php into my child-theme folder, but no matter what I edit there, the output stays the same. It is like this file is not taken into consideration. I also added teststrings to the HTML output and checked in the source code, it is simply not there. Editing page.php or the loop-single-9.php does show up in the output, so the child-theme works, and apparently it uses the style9 template, but I can not edit it.
Do you have a clue? To recreate, please simply copy the file into your childtheme and change something, for example <article id=”444test444″…
then call a post that has style9 and check the source code … still shows its good old post-XX ID, so definetely this file is not read. But then what else is used?
My aim is to use the td_1068x580 as featured image instead of 1068×0, and for this I need to change it in the post template, which should be exactly this one.
Thanks for a hint on where I find what I am searching for 🙂
Hello, i am very fresh to this theme but managed nearly all I needed so far. BUT I would like to show the featured image on my pages as I do on posts, I use post template 9 for it. Now when copying these lines
<?php
// override the default featured image by the templates (single.php and home.php/index.php - blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else {
echo $td_mod_single->get_image('td_1068x0');
}
?>
into my child’s page.php, it gives me an error, and as i saw in the breadcrumbs, they are called different for pages then for posts, so I guess also here I need a differnent code.
How can I solve this?
Thanks for this amazing theme
Sofian
You would need to insert that into the template file for the module/layout for post page you happen to be using for your site. Look at the files in the root of the theme folder.
eg., if using single template 5 … well, guess which files that would be ? 😉
single_template_5.php
loop-single-5.php
so, if you look at loop-single.5 you might see this
<div class="td-post-text-content">
<?php echo $td_mod_single->get_content();?>
</div>
<div class="clearfix"></div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_social_sharing();?>
<?php echo $td_mod_single->get_social_like_tweet();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
And so you might insert your code either in footer area above the post pagination, replace the social sharing element; or after author box … etc.
Often you can test by simply putting some text into a spot in above file, like
<p>Happy Sunday Everybody - this is a test.</p>
and see where that prints on your post page.
Hope that helped 🙂
Unfortunately, it’s not helping… this all makes sense for a standard theme, but with the WP Booster framework, I can’t find where the date is being printed. I can’t even get a determination if single.php is being called for my custom post types–or even regular posts.
I’ve removed the ability to choose a template from my CPT (I inquired before on how to enable it, but ended up not needing this functionality).
Is there any reference you can point me to for how a page is generated within the WP Booster framework?
It seems like single.php calls the single_template_#.php which in turn calls loop-single-#.php. Within loop-single there are echo statements within the metadata for the post–however, I can not find a way to edit this and get any result to change any page. Are the #’s corresponding to the template choices in order? If it’s left as default, would that indicate that single.php -> loop.php or single.php->single_template_1.php->loop-single.php ?
Hi there,
the loop you’re looking for is in loop.php file:
\wp-content\themes\Newspaper\loop.php
But in loop.php, you can only control the loop and count how many posts the loop is rendering, you can’t control the rendering there. You can control the rendering in the file @Lucian mentioned.
So you have the loop in one file and the rendering in the other. You can make the loop tell the render that some post is the 5th it finds, but that means you’ll have to make the function pass on a new variable.
I believe there’s another easier way:
– create a copy of td_module_9 and call it td_module_10
– edit line 15 of the new td_module_10, replace this <?php echo $this->get_no_thumb_class();?> for this td_mod_no_thumb (this will make td_module_10 = td_module_9 but with no thumbs)
– add a counter to the loop.php
– add if-test to the loop.php, something like, if counter==is-multiple-of-5 and the block to render is td_module_9, then render td_module_10 instead
this should do the trick!
I hope this helps, cheers!
EDIT: oh, I noticed now you want “4-no-thumbs + 1-thumb” and what I wrote will get you “4-thumbs + 1-no-thumb”, just swap the steps I wrote and you’ll get 1 thumb every 5 posts.
Hi,
I’m trying to add an image every 5th post in a visual composer block (Block 9). Where is the loop that controls the posts that are displayed in that block?
I’m using the page-homepage-blank.php template, and the loop in that file doesn’t seem to be what i’m looking for.
I also tried td_module_8.php, but adding a counter in there didn’t seem to do the trick.
Is there somewhere else I shold be looking?
I’m not asking for you to do this for me, just point me in the right direction.
Thanks!
You can add it at bottom of your single-loop.php template, or bottom of the post template you’re using.
For example I use loop-single-2.php for my default post template, along with single_template_2.php …
I moved the categories to right above my tags with a line break as they conflicted with Google News scraping the headline, but I did want them on the page.
SO, you could easily insert a shortcode your your HTML in that spot, such as here:
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
[ your custom code ]
</footer>
<?php echo $td_mod_single->related_posts();?>
[ your custom code ]
Hey Lucian. Sorry for being such a noob, I’m a learner 🙂 I have found how to do it, so no worries mate. href= ‘ . get_author_posts_url($current_user->ID) . ‘ class=”td-icon-user”>’ . ‘
Just 2 more questions if I can. Can we add a pull-down ajax filter to a block on the author’s posts template (so users can use it to filter the posts (7 days popular, random, etc. filter or categories filter) and can we modify classic pagination of the author’s post template (is it loop.php?) for similar what blocks have (infinite load, Load More button etc.)?
-
This reply was modified 11 years by
Riskdiver.
Hello,
We’re using the WooCommerce Brands extension to add brands profile pages to our website – When I look at the brand pages the breadcrumbs isn’t working correctly as it does with standard posts/pages and products. Can I add the brands custom post type to the breadcrumbs loop somehow so that it works like the rest of the site?
Thanks, James
Yes, we added the post_excerpt as follows for each: loop-single.php, loop-single-1.php, loop-single-7.php, loop-single-8.php:
<?php if (!empty($td_mod_single->post->post_excerpt)) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->post->post_excerpt;?></p>
<?php } ?>
I works, but only 1, 7, 8 show excerpt.
If I (temporarily) delete loop-single.php web site posts still load (no cache)! Which means maybe loop-single.php is not being called from this location for some reason?
Thanks again guys!
Clint
Hi,
If you don’t want to create a category and display posts from that specific category I’ afraid that this sort order that you want to create will not work like you want and you cannot have that result. A solution will be to add a tag to articles that you want to be displayed and filter by that tag, also the order will be latest post published.
If you enable sticky post from data source, the sticky post will appear in all blocks that are not using filter option: http://screencast.com/t/KcXgbhxvAC Also on loops it doesn’t appear.
Thanks!
Hi Alin, thanks I have it working for default, 1, 7, 8.
For rest I did modify loop-single.php the same way, no result.
But it seems loop-single.php is not being used. I renamed it (.off) and single posts still serve.
I had loop-single.php in child theme, but deleted. And template is set to DEFAULT site wide.
Odd? Any ideas?
Clint
Inside a blank page I have inserted a Block 10, showing latest posts of category A.
Do you know, which file I must edit to add a custom loop so to fetch posts from A with a specific custom field only?
Thanks.
Hi,
I was wondering about how to avoid loading the Author Name of posts when showing them load from widgets.
We need the author field, and the author box under the Full Entry page. But we do not want to show Author name anywhere else.
Thanks again for taking your time.
Hi,
Unfortunately it’s not easily doable, you could set a tag filter but then you have to pass the exact posts which are excluded from the loop, on it’s actual form it uses an offset of 5 posts but it only work if the filters are identical for grid and blog loop. My advice is to hire a professional to modify the code for you, the grid was built for the category page, other issues or errors may appear if it’s used somewhere else without applying the necessary adjustments on the code.
Thank you, Emil G.
Hi,
To show your ads in the category page after the category description you need to place you ad code here: http://screencast.com/t/LuW5gQXT1Q – and add using the do_shortcode() function.
Use this method to place ads between posts in the loop: https://forum.tagdiv.com/topic/how-to-add-ads-in-category-pages/#post-21940
Thanks
Hello,
Any help would be greatly appreciated.
I am trying to insert a custom ad into the loop-single-1.php
i followed instructions here: https://forum.tagdiv.com/how-to-insert-ads-in-custom-areas-of-the-website/
custom ad 8 in the theme options is populated with this ad code:
<div id=”taboola-below-article-thumbnails”></div>
<script type=”text/javascript”>
window._taboola = window._taboola || [];
_taboola.push({
mode: ‘thumbnails-j’,
container: ‘taboola-below-article-thumbnails’,
placement: ‘Below Article Thumbnails’,
target_type: ‘mix’
});
</script>
I created a new page with just the ad block (in this case custom ad 8). Then i saved the page and grabbed the shortcode:
<?php echo do_shortcode(‘[vc_row][vc_column width="1/1"][td_block_ad_box spot_id="custom_ad_8" spot_title="Taboola Under"][/vc_column][/vc_row]‘);?>
I placed the code below related posts into the loop-single-1.php like this:
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?><div class=”td-post-source-tags td-pb-padding-side”>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_the_tags();?>
</div><?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer></article> <!– /.post –>
<?php echo $td_mod_single->related_posts();?>
<?php echo do_shortcode(‘[vc_row][vc_column width="1/1"][td_block_ad_box spot_id="custom_ad_8" spot_title="Taboola Under"][/vc_column][/vc_row]‘);?>
<?php
} else {
//no posts
echo td_page_generator::no_posts();
}
however the final display is like this: https://www.dropbox.com/s/b5fke5p32qyz2n0/under%20related%20posts.PNG?dl=0
I need it nicely fit like it does when the same ad code is placed in the Article Bottom Ad < which i dont use because I need placed below related articles instead of above. exactly like here: https://www.dropbox.com/s/tifoolvtsyoayk4/article%20bottom%20ad.PNG?dl=0
Any assistance would be greatly appreciated.
Thank you
The number of items on each index is controlled by WordPress under the settings > reading > number of posts per page.
Or, you could possibly create a custom loop on the template for the author page.
Hi
I created a blog page in m y website using the loop homepage-with-article model.
Now I would like the posts are shown big as in module1 but not in their entire lenght
SO I wonder how can I shorten module1 so that it can show only excerpt
I know that module7 in derivated from module1 and it has excerpt, but in module7 excerpt the font style and pagination is not like .td-post-content
that it’s what I want
Hope you can understand my request… I’m looking for a module with the aspect of module1 but with “shortable” lenght as in other modules with excerpt!
thank you
Hi,
to access the login and pass are:
client
client
This is the dev site for a theme swap on a long established website with a huge comment database. When Newsmag is activated it shows the proper comment count for posts, but the comments are not displayed; not anywhere, on any post site wide.
Ive check that the call to comments is in all the single.php template.
<?php
locate_template(‘loop-single-1.php’, true);
comments_template(”, true);
?>
any assistance would be greatly appreciated.
Thank you in advance!
Hi,
We haven’t tested the theme using any of those plugins so I can’t provide an accurate answer on this.
I suggest you also address the issues you have using them to plugins authors and make sure that you sue them right.
The theme already has a built in infinite scroll pagination for blocks which you can use to display your content and use the infinite scroll pagination feature.
You can configure a block to use the infinite scroll pagination and on templates on which you can’t use the page builder add the block shortcode inside the template where you need this.
Here is an example for using block 13 with infinite scroll pagination on single post page after the related posts section:
– use VC page builder to customize the block: http://screencast.com/t/MYIDubqBqFJ
– switch to classic mode and get the block shortcode: http://screencast.com/t/tymN00V7m
– add the shortcode to post template, you’d have to edit the loop-single.php template and add the block shortcode using the do_shortcode function, like this: http://screencast.com/t/Qod46BQhTZtt
* here is the code I’ve used: http://pastebin.com/yRjEcaD2
– the result: http://screencast.com/t/kcqFH6hM
Thansk