# WP theme Editing gone wrong... Help



## naveen_reloaded (Mar 28, 2009)

hi guys..


i edited a theme for my taste..

now i am getting parse syntax error...


here is thr code .. please help me guys


```
<?php get_header(); ?>

<div id="content">

    <div class="featured">
        <div class="top"></div>
        <div class="mid"><?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?></div>
        <div class="bot"></div>
    </div>
    
    <?php
        $latest = get_option('magaling_latestnews_slug');
        $latcat = ($latest == '') ? 1 : get_category_by_slug($latest);
        query_posts('cat=' . $latcat->term_id); 
    ?>
    
    <!-- <h2 class="pagetitle"><?php echo $latcat->name; ?></h2> -->
    
    <div class="postgroup">
    <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>

    <div class="post indexpost" id="post-<?php the_ID(); ?>">
        <?php
            $customfields = get_post_custom();
            $scrp = get_bloginfo('wpurl') . '/tt-scripts/timthumb.php?';
            if (empty($customfields['paddimage'][0])) {
                $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magaling/images/thumbnail.png' . '&amp;w=83&amp;h=83&amp;zc=1';
            } else {
                $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') .  $customfields['paddimage'][0] . '&amp;w=83&amp;h=83&amp;zc=1';
            }
        ?>
        <div class="top"></div>
        <div class="mid">
            <img class="header" src="<?php echo $imgpath; ?>" alt="<?php the_title(); ?>" />
            <div class="title">
                <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                <p>
                    <span class="date"><?php the_time('F j, Y'); ?></span>
                    <span class="nodisplay">|</span>
                    <span class="comments"><?php comments_popup_link('No Comments', '1 Comments', '% Comments'); ?></span>
                    <span class="nodisplay">|</span>
                    <span class="categories"><?php the_category(', ') ?></span>
                </p>
            </div>
            <div class="entry"><?php the_excerpt(); ?></div>
        </div>
        <div class="bot"></div>
    </div>
<?php $flag = ($flag == 'odd') ? 'even' : 'odd'; ?>
        <?php endwhile; ?>
        
        <div id="pagenav">
            <?php 
                if (function_exists('wp_pagenavi')) : 
                    wp_pagenavi();  
                else : 
            ?>
            <div class="simplenavi">
                <?php posts_nav_link(' &nbsp;&nbsp;','&laquo; Previous Entries','Next Entries &raquo;') ?></div>
            </div>

    
    <?php endif; ?>
    
    
    
    <div class="extra">
        <div class="box box-popular">
            <div class="top"></div>
            <div class="mid">
                <h2>Popular</h2>
                <div class="interior">
                    <ul>
                    <?php akpc_most_popular(5,'<li><span>','</span></li>'); ?>
                    </ul>
                </div>
            </div>
            <div class="bot"></div>
        </div>
        <div class="box box-categories">
            <div class="top"></div>
            <div class="mid">
                <h2>Recent</h2>
                <div class="interior">
                    <?php themefunction_recentpost(); ?>
                </div>
            </div>
            <div class="bot"></div>
        </div>
        <div class="clearer"></div>
    </div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
```
-----------------------------------------
Posted again:
-----------------------------------------
i tried to add page navigation from this original file...



> <?php get_header(); ?>
> 
> <div id="content">
> 
> ...





all i wanted is to add page navigation at the bottom...

even when i tried to add.. i wasnt able to get to the page/2 instead it kept on showing me page/1 with each click on "older post " but with increment in page  like page/2 page/3 page/4


----------



## ravi_9793 (Mar 28, 2009)

Do you have original theme. Just replace the edited code with the original one.

For navigation, there is wordpress plugin.


----------



## naveen_reloaded (Mar 28, 2009)

i have aaded page navi plugin..

it doesnt show..

now i have solved the syntax problem..


as u can see ... the page navigation doesnt work...

cloudtechnica.com

please help me guys...

ravi i have pagenavi plugin...


----------



## ravi_9793 (Mar 28, 2009)

Try Breadcrumb NavXT plugin.

For download+installation refer here:
*mtekk.weblogs.us/code/breadcrumb-navxt/


----------



## mrintech (Mar 28, 2009)

For enabling post navigation simply insert following code:


```
<div class="postnav">
                  <div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
                  <div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
            </div>
```


----------



## ravi_9793 (Mar 28, 2009)

mrintech said:


> For enabling post navigation simply insert following code:
> 
> 
> ```
> ...


This will just add:

```
« Previous Page — Next Page »
```


----------



## naveen_reloaded (Mar 28, 2009)

guys please take a look at my site..

www.cloudtechnica.com


then u will know wht i am talking..

the page navigation is there ..

but i cant see page/2 or page/3


----------



## abhinandh (Mar 29, 2009)

use this code


```
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } 

else { ?>

<p class="pagination"><?php next_posts_link('&laquo; Previous Entries') ?> <?php previous_posts_link('Next Entries &raquo;') ?></p>

<?php } ?>
```


----------

