WordPress.org

Ready to get started?Download WordPress

Forums

Posts per Cat
after pagnation? (13 posts)

  1. deepbevel
    Member
    Posted 3 years ago #

    I tried to insert the code but I don't have anything in my index file called "pagnation" so I have no idea where to insert the code. And so of course it didn't work. How about a sample of where the code goes so non-php savy users can try this out?
    thanks

    http://wordpress.org/extend/plugins/posts-per-cat/

  2. urkekg
    Member
    Plugin Author

    Posted 3 years ago #

    Maybe too late answer, but can help someone.

    Pagination is part in template where we got links to navigate to previous/next page. For example, in TwentyTen theme for Main Index (index.php) we have this part of code:

    get_template_part( 'loop', 'index' );
    			?>
    			</div><!-- #content -->
    		</div><!-- #container -->

    Now, we put <?php do_action("ppc"); ?> right before </div><!-- #content --> to enable Posts per Cat, and got something like this:

    get_template_part( 'loop', 'index' );
    			?>
    <?php do_action("ppc"); ?>
    			</div><!-- #content -->
    		</div><!-- #container -->
  3. globalreporter
    Member
    Posted 2 years ago #

    Hi,

    I am not an html and php expert. have many files called "index" and in none of them I find the string of code you mention. Could you please tell me the exact parent and sub-parent folders that include the index file you are talking about?

    Thanks

    Stefano

  4. urkekg
    Member
    Plugin Author

    Posted 2 years ago #

    You need to look for index.php in your template (theme) directory. Look for line with </div><!-- #content --> (line 48 in Twenty Eleven theme) and put before this code (in line 47) this part of code:

    <?php do_action("ppc"); ?>

    Correct path is /wp-content/themes/<themename>/index.php

  5. globalreporter
    Member
    Posted 2 years ago #

    Thanks for your answer that unfortunately doesn't help me. my theme is called "bombax" and inside the theme's folder there is just one file called index.php where there is not even a line of code: it's totally empty! Maybe I need to look into another file?

  6. urkekg
    Member
    Plugin Author

    Posted 2 years ago #

    Bobmax theme uses home.php as index, so put do_action code before </div> <!--/content--> in line 14.

  7. globalreporter
    Member
    Posted 2 years ago #

    Did it, but it still doesn't work.
    Please look at my homephp code and tell me if it's right:

    <?php get_header();?>

    <div id="main" class="wrap">

    <div id="mainwrap">

    <div id="content">

    <div id="contentpad">

    <div id="contentwrap">

    <?php itx_loop();?>
    <?php do_action("ppc"); ?>

    </div>

    <div class="clear"></div>

    <div id="navi">

    <?php wp_pagenavi();?>

    </div>

    </div>

    </div> <!--/content-->

    <?php itx_sidebar('name=sidebar&pos=left');itx_sidebar('name=sidebar&pos=right');?>

    </div>

    </div> <!--/main-->

    <?php get_footer(); ?>

  8. urkekg
    Member
    Plugin Author

    Posted 2 years ago #

    No, no, that is not good. Here is correct code:

    <?php get_header();?>
    <div id="main" class="wrap">
    <div id="mainwrap">
    <div id="content">
    <div id="contentpad">
    <div id="contentwrap">
    <?php itx_loop();?>
    </div>
    <div class="clear"></div>
    <div id="navi">
    <?php wp_pagenavi();?>
    </div>
    </div>
    <?php do_action("ppc"); ?>
    </div> <!--/content-->
    <?php itx_sidebar('name=sidebar&pos=left');itx_sidebar('name=sidebar&pos=right');?>
    </div>
    </div> <!--/main-->
    <?php get_footer(); ?>

    PPC will be placed after pagination on the bottom of content part.

  9. globalreporter
    Member
    Posted 2 years ago #

    I pasted the code as you write it, but now the content is displayed at the bottom of my sidbar. It's a mess. I really dont know what's wrong!

  10. globalreporter
    Member
    Posted 2 years ago #

    could you please send me the link to a wordpress blog that uses your plugin? I would like to see how it looks like

  11. urkekg
    Member
    Plugin Author

    Posted 2 years ago #

    Maybe PPC is not compatibile with Bobmax theme, who knows?

    I only know that PPC is used on blogs http://www.myhonestanswer.com/previous-advice/ and http://www.enfants-spectacle.com/

  12. globalreporter
    Member
    Posted 2 years ago #

    Very weird. Anyway, it's a pity. I really need a plugin like yours. I need to organize posts in my pages in a customized way. Do you know other plugins that could help me out?

  13. urkekg
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry, I don't know. Try to search http://wordpress.org/extend/plugins/ and maybe you get sometging usefull?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic