October 5, 2015 at 10:51 am #16931
How 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 #16950
Try changing the line number 36 of loop-news.php file to
'post_type' => 'news',
'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 #16954
Thanks 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 #16972VeenaModerator
Have you changed the template to “News”?October 7, 2015 at 8:25 am #16973
It’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?
You must be logged in to access attached files.October 7, 2015 at 1:08 pm #16983
I 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 #16984
You 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.October 7, 2015 at 1:12 pm #16985This reply has been marked as private.October 8, 2015 at 1:45 pm #17005
I checked the page
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 #17007
My 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
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 #17012This reply has been marked as private.October 9, 2015 at 1:11 pm #17029This reply has been marked as private.
- The forum ‘Invent Theme Support’ is closed to new topics and replies.