Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › Show blog items in news template
- This topic has 11 replies, 3 voices, and was last updated 9 years, 4 months ago by
Raghavendra.
-
AuthorPosts
-
October 5, 2015 at 10:51 am #16931
schercka
MemberHow would I go about displaying my blog items on the news page so they show up in the same grid?
October 6, 2015 at 1:05 pm #16950Raghavendra
ModeratorTry changing the line number 36 of loop-news.php file to
'post_type' => 'news',
to
'post_type' => array('news', 'post'),
and you will have to use the News page template for this to work.
October 6, 2015 at 1:20 pm #16954schercka
MemberThanks for getting back to me.
Yes I am using the ‘News’ page.
I’ve added the array code as described and am not getting any errors, but also not getting the blog posts shown. Still only news items. I’ve added dummy text to the loop-news.php file to make sure I was editing the correct file in my child theme.
I noticed in line 46 there is more mention of ‘news’. Should I add something about posts here as well?
echo mo_get_post_type_archive_links('news', 'news_category');
Here is my news page: http://www.billesborgskolen.dk/nyheder/
And my blog page: http://www.billesborgskolen.dk/skolelederens-blog/October 7, 2015 at 8:22 am #16972Veena
ModeratorHave you changed the template to “News”?
October 7, 2015 at 8:25 am #16973schercka
MemberIt’s been ‘News’ template from the beginning. You understand that I want blog post items displayed with the news items in news template, right? Not news items on the blog views…
Should I give you admin access?
October 7, 2015 at 1:08 pm #16983Raghavendra
ModeratorI made the change in our dev machine and the blog posts immediately showed up on my news page. There is no other change I can recommend here.
If you still have trouble, pls post FTP access so that I can check the code changes. It is not possible to change via WordPress admin area alone.
October 7, 2015 at 1:09 pm #16984Raghavendra
ModeratorYou will need to add –
echo mo_get_post_type_archive_links('post', 'category');
but that is only to display the category links at the top for user navigation. The posts should show up anyway with the one line code change posted above.
http://support.livemeshthemes.com/forums/topic/show-blog-items-in-news-template/#post-16950
October 7, 2015 at 1:12 pm #16985schercka
MemberThis reply has been marked as private.October 8, 2015 at 1:45 pm #17005Raghavendra
ModeratorI checked the page
http://www.billesborgskolen.dk/nyheder/
and its is NOT using page template News. It is a news post type archive. We can show posts in the same too but will be too much of a work to style it since theme displays blog post archives differently than news post type archive (list instead of a grid). Pls use the page template and you should see the posts display in the grid of news.
If you still have trouble, pls give wordpress admin access and I will create one. Pls change the URL of the news page just in case you have changed the code of Invent to use nyheader as the slug for news custom post type.
Hope this helps.
October 8, 2015 at 1:50 pm #17007Raghavendra
ModeratorMy guess is right. You are using the slug nyheder for News post type –
'rewrite' => array('slug' => 'nyheder'),
You can revert to news in the code and then visit Settings->Permalink page and then you should see page display blog posts when you visit
http://www.billesborgskolen.dk/nyheder/
I did make this change to check the page but unfortunately I do not have access to Settings->permalink to reset the post type archive permalink.
October 8, 2015 at 5:49 pm #17012schercka
MemberThis reply has been marked as private.October 9, 2015 at 1:11 pm #17029Raghavendra
ModeratorThis reply has been marked as private. -
AuthorPosts
- The forum ‘Invent Theme Support’ is closed to new topics and replies.