Show blog items in news template

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support Show blog items in news template

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #16931
    Scherckaschercka
    Member

    How would I go about displaying my blog items on the news page so they show up in the same grid?

    #16950
    RaghavendraRaghavendra
    Moderator

    Try 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.

    #16954
    Scherckaschercka
    Member

    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/

    #16972
    VeenaVeena
    Moderator

    Have you changed the template to “News”?

    #16973
    Scherckaschercka
    Member

    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?

    Attachments:
    #16983
    RaghavendraRaghavendra
    Moderator

    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.

    #16984
    RaghavendraRaghavendra
    Moderator

    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.

    http://support.livemeshthemes.com/forums/topic/show-blog-items-in-news-template/#post-16950

    #16985
    Scherckaschercka
    Member
    This reply has been marked as private.
    #17005
    RaghavendraRaghavendra
    Moderator

    I 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.

    #17007
    RaghavendraRaghavendra
    Moderator

    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

    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.

    #17012
    Scherckaschercka
    Member
    This reply has been marked as private.
    #17029
    RaghavendraRaghavendra
    Moderator
    This reply has been marked as private.
Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.