• Resolved webescot

    (@webescot)


    Hi There!

    In my blog everything is working fine instead of permalink at main page post, headers permalink is working fone but at post page it shows me the domain url as you can see the problem at https://www.12chieftain.com

    here i go with my themes header code and index.php code, kindly someone look into this and try to resolve this issue, as i’m new to php,
    Thanks for your efforts.
    ===========header.php [start]====================================

    <?php
    						$getcats = get_categories( 'hierarchical=1&hide_empty=1&include=' . get_inc_categories("woo_cat_nav_") );
    						foreach( $getcats as $thecat ) {
    							if ( $thecat->category_parent == '0' ) {
    								echo '
    								<li'.(single_cat_title( "", false ) == $thecat->name ? ' class="current_page_item"' : '').'>
    									<a href="' . get_category_link( $thecat->term_id ) . '" title="View Posts in &quot;' . $thecat->name . '&quot;: ' . $thecat->description . '">
    										' . $thecat->name . '
    										<span>' . $thecat->description . '</span>
    									</a>';
    
    									 if (get_category_children($thecat->cat_ID) ) {
    										echo'<ul>';
    											wp_list_categories('title_li&child_of=' . $thecat->cat_ID );
    										echo'</ul>';
    									}
    								echo'</li>';
    							}
    						}
    					?>
    
    				</ul><!-- End categories -->

    ===========header [end]======================================
    above given code is working fine,
    ===========index.php [start]=====================================

    <div id="page-content">
    
    							<ul id="posts" class="clearfix">
    												<?php query_posts("&order=ASC") ?>
    								<?php
                                    $count = 1;
                                    $quicky = get_settings('woo_post_size');
    
                                    if (have_posts()) : ?>
    
    									<?php while (have_posts()) : the_post(); $category = get_the_category(); ?>
    
    										<?php 
    
                                                $image = '';
                                                $image = get_post_meta( $post->ID, "image", true);
                                                $class = '';
    											if( $quicky == 'false') {
                                                    $class = "";
                                                    $full = true;
    											}
                                                else
                                                {
                                                 $class = "quickpress";
                                                    if($count%2==1){ $class = $class . " post-left";}
                                                    else {$class = $class . " post-right";}
                                                    $full = false;
    											}
                                                if(is_sticky()){
                                                    $count--;
                                                    $class = "";
                                                    $full = true;   
    
                                                }
    
                                                $cat_id = $category[0]->cat_ID;
    
    										?> 
    
    										<li <?php post_class( $class ); ?>>
    
    											<div class="post-meta clearfix" style="border-color: #<?php if(get_settings( 'woo_cat_color_' .  $cat_id)){echo get_settings( 'woo_cat_color_' . $cat_id );} else {echo '#465159';}; ?>">
    
    												<h3 class="left"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    
    												<div class="categories" style="background:#<?php echo get_settings( 'woo_cat_color_' . $cat_id ); ?>;">
    													<a href="<?php echo get_category_link( $cat_id ); ?>" title="<?php echo get_cat_name($cat_id);?>"><?php echo get_cat_name($cat_id);?></a>
    												</div>
    
    											</div><!-- End post-meta -->
    
    											<div class="post-content clearfix">
    
    												<?php if( ($image || get_option('woo_auto_img') == 'true')&& $full == true) : ?>
    
                                                        <div class="wp-caption-thumb alignleft"><?php echo woo_get_image('image','303','130'); ?></div>
    
                                                    <?php elseif (($image || get_option('woo_auto_img') == 'true' ) && $full == false) :?>
    
                                                        <div class="wp-caption-thumb alignleft"><?php echo woo_get_image('image','120','100'); ?></div>
    
    												<?php endif; ?>
    
    												<?php the_excerpt(); ?>
    
                                                    <a class="read-more" href="<?php the_permalink() ?>">Read More...</a>
    											</div><!-- End post-content -->

    ===========index.php [end]=======================================

    regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • replace line 106 on index.php
    <?php the_permalink() ?>
    with
    <?php the_permalink(); ?>

    (you forgot the ; )

    Thread Starter webescot

    (@webescot)

    Hi krembo99

    Thanx 4 your time, as per your instruction i replace the above said code but nothing happened,

    ========Changes @ index.php of my theme========
    #1
    <h3 class="left"><a href="<?php the_permalink() ?>" rel="bookmark" title="1Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
    replaced with
    <h3 class="left"><a href="<?php the_permalink(); ?>" rel="bookmark" title="1Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>

    #2
    <a class="read-more" href="<?php the_permalink() ?>">Read More...</a>
    replaced with
    <a class="read-more" href="<?php the_permalink(); ?>">Read More...</a>
    ====================end===============
    Still facing the same problem,

    Warm Regards

    When I visited your page, It works now ….
    (or maybe, we just adjusted ANOTHER problem that you did not even see..)
    Now your permalinks on the post lead to the actual post, before, they were not working …

    (and remove the “1” from <a href="<?php the_permalink() ?>" rel="bookmark" title="1Permanent Link to <?php the_title_attribute(); ?>">)

    Thread Starter webescot

    (@webescot)

    Hi There,

    It’s working because i disabled permalink from settings, when i enable permalink i’m getting same problem, also after enabling permalink when i restart me browser, my category links show 404 error, and at the category main page it shows only one post, that’s why i got to go with Default setting

    Please help,
    removed “1” it was Typo – Thanx

    Thread Starter webescot

    (@webescot)

    @krembo99

    Again i enabled Permalink, please check

    Regards

    well,, you are probably using 2.8.4 …
    It has some permalink problems (I myself encountered a few)
    Try to check your .htaccess file, rename it on the server for backup, and let wordpress create new one…
    Then try to refresh your permalink structure

    Thread Starter webescot

    (@webescot)

    Yes i’m using 2.8.4

    renamed my .htaccess and wordpress created again .htaccess with following code :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Would you like me to shift to some older version, If i move to older one what about my contents already uploaded to the the, Please guide

    Thread Starter webescot

    (@webescot)

    Thanx a lot krembo99, for your kind attention

    As i tried some rewritecode in Common settings of my WordPress
    ie. admin >>setting >>permalink

    under the Custome structure i puted /%category%/%postname%

    and my Permalink start working on my posts

    Thanxs again, May GOD bless you
    Regards

    May <strong>GOD</strong> bless you
    somehow I had the feeling it was coming ..

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Permalink Problem In Theme’ is closed to new replies.