Showing one specific posts category in wordpress archives

  • Unknown's avatar

    I am an intermediate PHP developer working on my first WordPress project.

    Like many websites, I have news and blogs section. In the blog section I have archives. My only problem is: WordPress consider news posts and blogs posts both as one post. What distinct them is the different category in which I placed them accordingly

    I am passing the following params to retrieve the archives:

    $archivesParam = array('type' => 'monthly',
                           'showcount' => true,
                           'limit' => 6,
                           'cat' => 2,
                           'format' => 'custom',
                           'before' => '<br>- ',
                           'after' => '</br>');

    Then I call the get archives method

    wp_get_archives($archivesParam)
    And as expected, I got the last 6 months archives of all my posts.

    Is there a way how to see archives by month of one specific category? I want to see archives of posts by category blog of one particular month.

    I have spent two days reading on WordPress forums with no working solution for me. My time is due and therefore I came here asking for you help.

    URL of my website: http://uhm.rightbrain-nodes.com/blog/

    Thanks in advance.

    EDIT —–

    To define further my problem:

    http://uhm.rightbrain-nodes.com/blog/ – all is fine here however when you click archives of one particular month you will see posts from all categories rather than just of blog category.

  • Unknown's avatar

    These forums are for WordPress.com blogs and your blog (http://uhm.rightbrain-nodes.com) appears to be self-hosted.

    WordPress.org has its own support forums. You should head over there for help. Link: https://wordpress.org/support/

    Good luck.

  • The topic ‘Showing one specific posts category in wordpress archives’ is closed to new replies.