- NewspaperPosts Loop Element
- NewspaperFlex Block Builder and Flex Loop Builder
- NewspaperBookmark – Save For Later
- NewspaperModules Builder in Newspaper Theme
- NewspaperFilters and sorting for taxonomies
- NewspaperPage templates
- NewspaperSmart Sidebar
- NewspaperChild Theme Support
Hey Simon,
Many thanks for that.
I was probably not very clear on what I was looking for in my description of the issue.
I don’t mean about pagination between posts, but between pages in a list/smartlist within a post.
What I need to do is move the social buttons below the pagination within a post (e.g. Smartlist) so that the next buttons to the next page within the list appear below the social buttons). At the moment it seems like the pagination for the lists seems to be within the content though and I can’t work out how to move it as it doesn’t appear in the loop file.
Thanks for trying though.
Hey Bogdan,
Thank you, that helped. One more question I hope you can help me with. I want the same set of share buttons above my pages as i have above the posts. I found this line of code in loop-single8.php that calls for them:
<?php echo $td_mod_single->get_social_sharing_top();?>
How do I integrate this into my page-pagebuilder-title.php? I already managed to add a Facebook share, but I would also like to call this whole set of share buttons. I tried several things, but my content just dissapears whatever I try, so I’m doing something wrong. What would be the right code to add?
Code now:
<?php while ( have_posts() ) : the_post(); ?>
<div class="td-main-content-wrap td-main-page-wrap">
<div class="td-container tdc-content-wrap">
<div class="td-page-header td-container">
<div class="td-crumb-container">
<?php echo td_page_generator::get_page_breadcrumbs(get_the_title()); ?>
</div>
<h1 class="entry-title td-page-title">
<span><?php the_title() ?></span>
</h1>
<?php echo do_shortcode('[vc_row][vc_column][vc_facebook][/vc_column][/vc_row]'); ?>
</div>
<?php the_content(); ?>
</div>
<?php
if($td_enable_or_disable_page_comments == 'show_comments') {
?>
<div class="td-container">
<div class="td-pb-row">
<div class="td-pb-span12">
<?php comments_template('', true); ?>
</div>
</div>
</div>
<?php
}
?>
Hello,
Our theme modules and blocks will ignore sticky posts. There is no way you can show sticky posts in blocks or grids. They will however show on loops meaning the category pages or blog roll page.
Thank you!
Hello,
I have a custom post type called “events” for e.g selected for the Posts loop settings Post Type to show up a grid of events
ThatÂŽs great so far. Giving me all events with a pagination.
Now is it possible to have a little filtered navigation on top of that page? As i understand the “Filters for the loop” are only back end part.
Visitors would like to filter through different criteria of the post type like for e.g “custom_date”, “category”, “price” …
CanÂŽt see a way to do this, so i tried to install a 3rd party plugin called “Search % Filter Pro” (http://docs.designsandcode.com/search-filter/). The problem here, when adding this to the page created (mydomain.com/events) filtered selections wonÂŽt stay on that page and redirect to category page. instead only updating the grid of data.
I donÂŽt want to use something complex like Essential Grid Plugin or so because i have bad experience with it in the past like bad performance and so on.
Maybe you can help me with it.
thanks
Hi,
To achieve that you need to modify the loop single file corresponding to the post template style that you use (post template 2 – loop-single-2.php and so on) found in the theme folder – https://www.screencast.com/t/yxPPd1Lqwu2M and change the order of the structure in the file –
https://www.screencast.com/t/nhaw6ea8L
For example if you want to display related posts just under the post content, change it like this –
https://www.screencast.com/t/YCKjHos0RF by moving that code above the social sharing bottom
Result – https://www.screencast.com/t/nxamntnZN1
Thanks
Hello,
Unfortunately the theme was built to show categories as they are not a post type. A category is a taxonomy which is very different from a post type. You cna show posts or pages or events or other custom post types in our theme blocks using the post type filed from block settings or the latest articles section under post loop settings as you mention above, but there is no option for showing a category page on the homepage. Sorry. I do not know of a plugin that can do this.
Thanks.
It would be easier if you could attach images here. But I managed to get this working through a plugin that gave me the option of adding categories to pages. What I wanted was to instead of looping posts, I wanted to loop pages with pagination.
When you are on a page, and choose the template “Pagebuilder + latest articles + pagination” – you also get the block “Homepage latest articles” – it has three tabs: General, Post loop setings and Unique articles. Well, under “Post loops settings” you get a lot of options and filters, one of these is the option to use different kind of post types. In my case, I wanted to use pages, but I could not figure out how to for instance use only pages that where children of another page – so it just looped all pages.
But it feels like a “hack” to have to use categories for pages, in order to specify what pages I want in a loop, it would be much better if it also was a filter based on “Children of ID” for instance.
The site I am talking about is ondogbreeds.com – On the homepage I loop both pages and posts in the “Homepage latest articles” section, in the top grid I loop only posts. In the block below the top grid, I loop only pages from certain categories.
In the sub-pages like this one ondogbreeds.com/dog-breeds/a-c/ I then loop only pages with the category “a-c” and it’s working.
But if there is another way, other than adding categories to pages, in order too loop specific pages I would be very much interested. As I said, it just feels like a hack if you need an extra plugin to do it. Also, what if that plugin stops working at some point.
Hi,
Depends of what you want to modify, as you can see in the loop-single-12.php this is the structure of the post template – https://www.screencast.com/t/MoywbspEUq
As a simple example i added a heading between social sharing bottom and next/prev posts https://www.screencast.com/t/y3iIHZ8uw – https://www.screencast.com/t/QA0rpK7Q
Make a backup of the file you modify just to be safe and you should consider hiring a developer/freelancer to help you if you don’t know how to go about it.
Thanks
Catalin, hi, maybe you did not understand me, sorry for this
You have to edit each module from your theme packet, like this -> http://screencast.com/t/vD7wnTHlkH
if i edit td_module.php and td_module_1(1,2,3…19).php its work only for layouts in Posts loop settings, only for Latest Article blocks.
But me need display tags for Blocks (1,2,3…25), maybe need edit td_block.php and td_block_1(1,2,3…25)?
Thanks
Hello,
The number of posts displayed in the loop (search template, author template and post category archives) is added here: https://www.screencast.com/t/8g5JWiIWRU5I
It is a wordpress setting
Thank you!
Hi catalin, yes i’ve tried with your code but i can do this only in the wordpress editor. i need to make the same on the youtube video in the posts but the iframe don’t work on it.
i need to set autoplay and loop in the featured video not in the video in the wordpress editor.
It’s possible? is very important for my client.
Thankyou
Hi,
How to show ‘last modified date’ on every single post, replacing the default ‘published date’? Im not too familiar with these things đ
I use “Style 3″ as sitewide post template. So I edited loop-single-3.php file:
Replacing this:
<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>
with this:
<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<span> Updated: <?php the_modified_date(); ?></span>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>
The problem is, I use other post template style on some particular posts but I cant find the above mentioned code in some other template style file. So, how to make other post template to show ‘last modified date’?
Is there better way to do this?
Thanks in advance.
Hello F3rious,
Yes, if you want to do this, you should use the do_shortcode method and add it inside your post and if you want to have this ad inside to your all posts which are part of certain post template, you should edit the theme core file according to your post template used by you. The code is here -> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?> If you want to add directly the code inside the post, you should do this -> http://screencast.com/t/infK2eNQlf8k Also, if you are using the post template style 1 you should edit the loop-single-1.php like this -> http://screencast.com/t/b8FBqZmb and there you should ad the code where you want to appear on the page.
Thanks for the message!
Hi,
I want to add to single_template.pho file or loop-single.php
<? Php CATEGORY TEMPLATE in Style 1?>
<? Php CATEGORY POSTS TOP STYLE in Grid 1 – Grid Style 1 – Default?>
<? Php Block 16 the last 5 items inserted?>
You understand now??
Hi,
The default sort order on loops is by latest, but you could alter the query – https://codex.wordpress.org/Alphabetizing_Posts using the theme’s sort order options for blocks – http://screencast.com/t/6H11m6iHz For example you could try this code in functions.php file – http://screencast.com/t/z1rPlhUl – http://pastebin.com/1C9t7PUf
Hope this helps!
Hello,
Unfortunately the blog roll homepage does not have any options to exclude categories from it. It will always show all posts in a latest sorting option. It can only be made by hard-coding it. Please refer to this section: https://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category. Here is where the theme loop is being created: http://screencast.com/t/SoQMDz9oG
Thank you!
Hello,
Unfortunately, there are no sorting option for the category archive. A category page is not like a standard page. It will show all your posts that belong to that category in a “latest” sorting fashion. The only options available for the category pages are available in the theme panel under the per-category setting. You cannot edit a category page in visual composer and you cannot sort the posts as there is no such functionality added to them. WordPress only provides a loop of the latest posts on category pages and we do not change that functionality. We added a bit of style to it, but do not change the base structure of a category page.
Visual composer as well cannot be used on a category page as they also did not create it to handle categories. We only recommend using visual composer on pages but the plugin allows the use on posts as well, but no category pages.
Thank you!
I’m trying to add another query/loop to the mobile homepage. I’d like to display latest posts from both “News” and “Podcast” categories. I’ve duplicated the loop, however nothing is being rendered the second time. Why?
<!-- begin Podcast loop -->
<div class="td-container td-pb-article-list td-main-content" role="main">
<?php if ( empty( $paged ) or $paged < 2 ) { ?>
<h4 class="block-title"><span><?php //echo $td_list_custom_title; ?>Latest Podcasts</span></h4>
<?php }
$posts_per_page = get_query_var('posts_per_page') ? get_query_var('posts_per_page') : 5;
// query used on Latest Articles section
$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'category_name' => 'Podcast',
'posts_per_page' => 5,
);
query_posts($wp_query_args);
locate_template('loop.php', true);
echo td_page_generator_mob::get_pagination();
wp_reset_query();
?>
</div>
<!-- begin News loop -->
<div class="td-container td-pb-article-list td-main-content" role="main">
<?php if ( empty( $paged ) or $paged < 2 ) { ?>
<h4 class="block-title"><span><?php echo $td_list_custom_title; ?></span></h4>
<?php }
$posts_per_page = get_query_var('posts_per_page') ? get_query_var('posts_per_page') : 5;
// query used on Latest Articles section
$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'category_name' => 'News',
);
query_posts($wp_query_args);
locate_template('loop.php', true);
echo td_page_generator_mob::get_pagination();
wp_reset_query();
?>
</div>
Hi.
I want to hide the author box from posts that are made from the user ‘news room’ (eg, with user id = 10 ). I don’t want to hide it in specific posts with css, but rather target all posts of that user, past, present, and future.
I have located in the file loop-single.php (and loop-single-1.php loop-single-2.php etc) the line:
<?php echo $td_mod_single->get_author_box();?>
I suspect I have to wrap an if statement around this line, something like that:
<?php if ( .... ) { ?> //author id is not equal to 10, display the author card
<?php echo $td_mod_single->get_author_box();?>
<?php } ?>
how do i do this the correct way? what shall i put in this if statement?
I see that the mobile theme displays biggrid posts from a featured category and then the latest posts. I need to change the query loop to display 5 posts from category x, then 5 posts from category y, and then 5 posts from category z. I guess I would like to use a different module on the front-page.php in mobile theme.. I love the speed and simplicity of the mobile theme however if I have no way to modify the mobile home page I will have to revert back to responsive theme which I’d rather not do.. Thanks
churchleaders.kinsta.com
Hi all!
I am working with category menus and I would like the loop of posts to be sorted by popularity (number of clicks on posts). Now, I know that Newsmag provides this possibility already by doing so manually. But is there a way that posts are sorted automatically by “popular posts first”? Am I overseeing something?
Thank you!
Hello,
If the home page of the mobile theme is the one you are referring to, you cannot change the category. It will show the latest posts from the featured category. That is the top grid. The bottom element is a loop of all your latest articles. The mobile theme does not have settings to change these elements. If you want to have sorting options and different visual composer blocks, you will have to use the standard responsive version of the theme (disable the mobile theme plugin)
https://forum.tagdiv.com/the-mobile-theme/
Thank you!
Hello PaTrock,
If you want to change the structure date for posts, you should edit the core file corresponding to your post template used by you. For example, if you are using the post template style 1, you should edit the loop-single-1.php like this -> http://screencast.com/t/N5DCrxo1 and the result you should see here -> http://screencast.com/t/bm0VMQprvAC
Hope this helps!
Thanks for the message!
Hi guys,
first of all thank you for this excellent product! I am a happy customer and just have a – hopefully – simple question.
In the file “loop-single.php” you are calling the post date in the meta.
<div class="meta-info">
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_views();?>
<?php echo $td_mod_single->get_comments();?>
</div>
I am only able to change that date format in my wordpress overall settings. But I dont want to change it there, because that would change it for everything on my site! Can you please provide me a code snippet, I could use here to change the date format just in that file?
I`d like to show it like this: 5. November 2016 – 23:21
Which is “j. F Y – G:i” in my wordpress overall setting right now đ
But that date and time format should only be showing in the posts (meta) and not on everything I am showing in my wordpress site.
I have only very basic understanding in coding, I hope u can help me without a lot of work here and that it is a very easy question for you pro-guys ;))
Looking forward to your answer. I hope I explained my question good enough. Thank you for your time and your support.
Yours,
Patrick
Hello billal,
Please notice that if you should want to display your Ads in all your posts, you have to alter the code from the core file where the posts are created like td_module_single_base.php or also, the each single post template and loop files, corresponding to your post template used by you, like this -> http://screencast.com/t/tFYx0vkVRxOT -> http://screencast.com/t/DdHG4HZxqvX
Please notice that is not a simple task and if you are not aware of the steps which are needed to take in this regard, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!
Thanks for your understanding!