Category parent

NapitWPTech Theme Support Forums Masonry Brick Category parent

This topic contains 7 replies, has 2 voices, and was last updated by  Bishal Napit 2 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #450

    polov
    Participant

    hello,
    on Home page, I would like to display only the parent-category, because I also have sub-categories for articles
    can you give me a code and tell me where to add it
    thanks

    (currently the article only displays the sub-category)

    • This topic was modified 3 months, 1 week ago by  polov.
    #452

    Bishal Napit
    Keymaster

    @polov

    That will require lots of code customization work. So, if you can code that on your own then, you can achieve the same via the child theme: https://napitwptech.com/tutorial/wordpress-development/tutorial-creating-wordpress-child-theme/

    Thanks.
    Bishal Napit

    #454

    polov
    Participant

    ok, i have a child theme

    but can you tell me at which location you have placed the category view on the homepage, which code and in which .php page?
    I do not find
    thanks

    #455

    Bishal Napit
    Keymaster

    @polov

    For the home page, you need to modify the file: index.php with custom query on the child theme.

    Thanks.
    Bishal Napit

    #456

    polov
    Participant

    ok
    custom query? I do not know how to do that
    but thanks

    #457

    Bishal Napit
    Keymaster

    @polov

    What I mean to say is, you might need to use custom WP_Query: https://codex.wordpress.org/Class_Reference/WP_Query to achieve the same via child theme. Hope you have got it now.

    Thanks.
    Bishal Napit

    #460

    polov
    Participant

    ok
    but I will cancel my search and use the TAGS, it works for me
    thanks

    #461

    Bishal Napit
    Keymaster

    @polov

    Ok. Do let me know if you have got any further query regarding to the theme. I will try to help you on those as far as possible.

    Thanks.
    Bishal Napit

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.