Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 28-03-2009, 09:46 PM   #1 (permalink)
!! RecuZant By Birth !!
 
naveen_reloaded's Avatar
 
Join Date: May 2005
Location: In Everyone`s Heart
Posts: 2,985
Default WP theme Editing gone wrong... Help


hi guys..


i edited a theme for my taste..

now i am getting parse syntax error...


here is thr code .. please help me guys

Code:
<?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...

Quote:
<?php get_header(); ?>

<div id="content">

<div class="featured">
<div class="top"></div>
<div class="mid"><?php include (ABSPATH . '/wp-content/plugins/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 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>


<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>

<?php get_sidebar(); ?>
<?php get_footer(); ?>


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
__________________
Know My Thoughts..
Visit my Blog @ www.Urssiva.com
Visit My Tech Blog @ www.CloudTechnica.com

Last edited by naveen_reloaded; 28-03-2009 at 09:54 PM. Reason: Automerged Doublepost
naveen_reloaded is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 28-03-2009, 10:16 PM   #2 (permalink)
TechTin.com
 
ravi_9793's Avatar
 
Join Date: Jun 2005
Location: www.TechTin.com
Posts: 4,090
Default Re: WP theme Editing gone wrong... Help

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

For navigation, there is wordpress plugin.
ravi_9793 is offline  
Old 28-03-2009, 10:25 PM   #3 (permalink)
!! RecuZant By Birth !!
 
naveen_reloaded's Avatar
 
Join Date: May 2005
Location: In Everyone`s Heart
Posts: 2,985
Default Re: WP theme Editing gone wrong... Help

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...
__________________
Know My Thoughts..
Visit my Blog @ www.Urssiva.com
Visit My Tech Blog @ www.CloudTechnica.com
naveen_reloaded is offline  
Old 28-03-2009, 10:31 PM   #4 (permalink)
TechTin.com
 
ravi_9793's Avatar
 
Join Date: Jun 2005
Location: www.TechTin.com
Posts: 4,090
Default Re: WP theme Editing gone wrong... Help

Try Breadcrumb NavXT plugin.

For download+installation refer here:
http://mtekk.weblogs.us/code/breadcrumb-navxt/
ravi_9793 is offline  
Old 28-03-2009, 10:36 PM   #5 (permalink)
Wise Old Mouse
 
mrintech's Avatar
 
Join Date: Sep 2005
Location: Bhopal, India
Posts: 1,930
Default Re: WP theme Editing gone wrong... Help

For enabling post navigation simply insert following code:

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>
__________________
- MrinTech :)
mrintech is offline  
Old 28-03-2009, 10:41 PM   #6 (permalink)
TechTin.com
 
ravi_9793's Avatar
 
Join Date: Jun 2005
Location: www.TechTin.com
Posts: 4,090
Default Re: WP theme Editing gone wrong... Help

Quote:
Originally Posted by mrintech View Post
For enabling post navigation simply insert following code:

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>
This will just add:
Code:
« Previous Page — Next Page »
ravi_9793 is offline  
Old 28-03-2009, 10:45 PM   #7 (permalink)
!! RecuZant By Birth !!
 
naveen_reloaded's Avatar
 
Join Date: May 2005
Location: In Everyone`s Heart
Posts: 2,985
Default Re: WP theme Editing gone wrong... Help

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
__________________
Know My Thoughts..
Visit my Blog @ www.Urssiva.com
Visit My Tech Blog @ www.CloudTechnica.com
naveen_reloaded is offline  
Old 29-03-2009, 08:56 AM   #8 (permalink)
Proud to be Linux
 
abhinandh's Avatar
 
Join Date: Jun 2006
Posts: 458
Default Re: WP theme Editing gone wrong... Help

use this code

PHP 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 ?>
__________________
http://abhinandh.com
abhinandh is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by gforz
- by soumya

Advertisement




All times are GMT +5.5. The time now is 03:10 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2