When you go to my website through mobile, you get to see 3 articles, below that you can see the header ”latest articles”. But it shows the same 3 articles that are above them : http://www.screencast.com/t/OrFuRhXf
How can I change the settings of these?
Hello,
Te top grid shows featured articles. That means articles added to the featured category. The bottom module shows all the articles in a latest to oldest sorting option. There is no sorting option in our theme for these blocks.
If you want to customize it and avoid repetition, find out what the category ID is of your featured category. Say for instance that it is 26
Now, inside of Newspaper\mobile\front-page.php you will find this code:
$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
);
Make sure to add:
'category__not_in' => array( 26 ),
to the end of the array so that it looks like this:
$wp_query_args = array(
'ignore_sticky_posts' => 1,
'post_status' => 'publish',
'posts_per_page' => $posts_per_page,
'paged' => $paged,
'category__not_in' => array( 26 ),
);
Thanks.
Hi,
Where do I find the front page-page.php folder? Is it at plugins? Or do I have to open up all the folders up via FileZilla?
Thanks
Hi,
You will find it by the path mentioned by Bogdan
– https://www.screencast.com/t/xhYavtycTYgU
Use your FTP client to access the theme folder, follow the path, edit the file as shown and save it.
Thanks
Hi guys,
will this help the 3 featured posts to be randomised as my issue is that the top 3 displays the most recent articles then the latest articles display the same ones.
I am asking this because, my site publishes articles in different categories and I’d like the featured posts to be randomised preferably within 7 days of posting as i applied the above suggested code and as i have 6 categories, no articles were displayed
please advice
Hi,
@masterskg The default sorting for the mobile top grid is by featured posts, this could only be changed in the code, as there is no setting in the matter.
This is where you can make the change to a random sorting if that is what you need
– https://www.screencast.com/t/ydd9GJNt
– https://www.screencast.com/t/2fSGl9Qz8
Thanks
Thank you Simion, unfortunately that display articles way too old .
I inserted categories id’s and random posts, it seems to work.
Perhaps, the team could look into providing more customisation options for mobile as majority of sites are focusing on mobile usage, it’d be nice to see more options to customise mobile front page
