Sunday, 26 May 2013

Marginal pagination on home.php

Marginal pagination on home.php

I'm trying too make a custom wp-theme and use a few loops in home.php. But now I can't finish home.php because of pagination. How cant I realize any type of pagination with saving that kind of structure?
Here is my code:
<div id="audio" class="categories" >
            <div style="height: auto; width: 100%">
            <?php
                    global $post;
                    global $wp_query;
                    $args = array( 'numberposts' => 6, 'category' => 150 );
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post);
                    $page=get_page_by_title($page_name);?>

                    <div class="box" style="overflow:hidden;"> 

                        <div class="box-image" style=" background-image: url(<?php echo catch_that_image();?>);">
                        </div> 
                        <p class="homepostitle">
                            <a href="<?php the_permalink(); ?>">

                                     <?php the_title(); ?>

                            </a>
                        </p>
                    </div>
            <?php endforeach; ?>
            </div>

        </div><!-- end #audio -->


        <div id="art" class="categories">

            <?php
                    global $post;
                    global $wp_query;
                    $args = array( 'numberposts' => 6, 'category' => 101 );
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post);
                    $page=get_page_by_title($page_name);?>

                    <div  class="box" style="overflow:hidden;">
                        <div class="box-image" style=" background-image: url(<?php echo catch_that_image();?>);">
                        </div>
                        <p class="homepostitle">
                            <a href="<?php the_permalink(); ?>">

                                     <?php the_title(); ?>

                            </a>
                        </p>
                    </div>
            <?php endforeach; ?>

        </div><!-- end #art -->


        <div id="video" class="categories">

            <?php
                    global $post;
                    global $wp_query;
                    $args = array( 'numberposts' => 6, 'category' => 26 );
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post);
                    $page=get_page_by_title($page_name);?>

                    <div  class="box" style="overflow:hidden;">
                        <div class="box-image" style=" background-image: url(<?php echo catch_that_image();?>);">
                        </div>
                        <p class="homepostitle">
                            <a href="<?php the_permalink(); ?>">

                                     <?php the_title(); ?>

                            </a>
                        </p>
                    </div>
            <?php endforeach; ?>

        </div><!-- end #video -->


        <div id="fashion" class="categories">
        <?php
                    global $post;
         

No comments:

Post a Comment