Home Forums Square Second page of posts.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1364
    Minvoo
    Participant

    Hi. I have many categories on my site for example:
    news – you can see it on main page
    culture – culture category
    sport – sport category
    etc.

    I’ve added simple line of code to functions.php to see only news (id=4) category on main page which is:

    function only_one_category()
    {
        if ( is_home() || is_front_page() ) {
            global $wp_query;
            $wp_query->query('cat=4');
        }

    The problem is when I have many posts on main page. The site automatically creates page 2,3,4 etc. It’s fine, but it works fine for category pages. On main page when I enter to /page/2/, my posts don’t change. I have the same posts like on /page/1/ or /page/3/ etc..
    Can you tell me how can I fix this or when can I find code which is responsible for doing next pages for main page?
    Maybe you know other trick to show only one category on main page which will not damage the site ?

    #1456
    Hash
    Keymaster

    Hi,

    The Square theme does not have feature to show the blog post in the front page. Can you please let us know your website url?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.