ThemeShaper Forums » Thematic

[closed]

Different number of posts at frontpage and categories, search etc. w/o hacking

(4 posts)
  • Started 4 years ago by stengl
  • Latest reply from sober
  • This topic is not resolved
  1. stengl
    Member

    Hi all,

    I am trying to limit my frontpage to 1-full-post. At the same time I want all archives and searches to display more than one result per page. Changing the "Blog pages show at most" Value under Admin -> Settings -> Readings affects not only the Frontpage, but also archives.

    How can I manually adjust one of the values without too much hacking? I am using the Autofocus+ Child Theme http://fthrwght.com/autofocus/plusdemo/

    My initial thought was to use a conditional function like this:

    function my_custom_query() {

    if (is_archive()) {
    global $query_string;
    query_posts($query_string . "&showposts=5");
    }
    }
    add_action('thematic_above_indexloop','my_custom_query');

    … which does not work.

    Any ideas?

    Posted 4 years ago #
  2. stengl
    Member

    http://wordpress.org/extend/plugins/cbnet-different-posts-per-page/ does the trick, even though I would prefer to have it hard-coded via hook/filter.

    Posted 4 years ago #
  3. Hi Stephan,

    you have two options:

    1.) Add one function, covering all changes, or several functions to thematic_above_indexloop, thematic_above_categoryloop, and so on (the templates are using different action hooks)

    2) Add one function, covering all changes, to thematic_navigation_above.

    Chris

    Posted 4 years ago #
  4. sober
    Member

    I am also interested in the code for this. please share if you have found it

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.