SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question wordpress - localhost error 403 when accessing link in single.php

    Good Day Good People,

    I have WordPress running on XAMPP localhost. I don't know PHP but I followed some tutorials and modified WP themes to customize my blog to look like rest of my website.

    Issue: I created 2 test posts for each category e.g. HTML (2) CSS (2) dated differently. When I go to post archives for a month and click "Posted in..." link or within a post "Categorized as" link, it gives me localhost error 403. When I hover over that link, the pop up window says "View All Posts in HTML" which I guess should take me to that specific category.

    I appreciate any advice.

    Thank you all.

  2. #2
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    205
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Can you please past your Single.php code !?

  3. #3
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hi deadmix,

    please, see code below


    PHP Code:
    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */

    get_header();
    ?>
    <?php get_sidebar
    (); ?>
        <div id="rightcol" role="main">

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

            
            <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
                <h2><?php the_title(); ?></h2>

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

                    <?php wp_link_pages(array('before' => '<p><strong>' __('Pages:''kubrick') . '</strong> ''after' => '</p>''next_or_number' => 'number')); ?>
                    <?php the_tags'<p>' __('Tags:''kubrick') . ' '', ''</p>'); ?>

                    <p class="postmetadata alt">
                        
                            <?php /* This is commented, because it requires a little adjusting sometimes.
                                You'll need to download this plugin, and follow the instructions:
                                [url]http://binarybonsai.com/wordpress/time-since/[/url] */
                                /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); $time_since = sprintf(__('%s ago', 'kubrick'), time_since($entry_datetime)); */ 
    ?>
                            <span class="postmeta"><?php printf(__('Published %1$s | Categorized as <a class="page" href="%3$s  | ''kubrick'), get_the_time(__('F, Y''kubrick')), get_the_time(), get_the_category_list(', ')); ?></a>
                            <?php printf(__("<a class='page'href='%s'>RSS 2.0</a> feed","kubrick"), get_post_comments_feed_link()); ?></span> 

                            <?php if ( comments_open() && pings_open() ) {
                                
    // Both Comments and Pings are open ?>
                                <?php printf(__('''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( !comments_open() && pings_open() ) {
                                
    // Only Pings are Open ?>
                                <?php printf(__('Responses are currently closed, but you can <a href="%s" rel="trackback">trackback</a> from your own site.''kubrick'), get_trackback_url()); ?>

                            <?php } elseif ( comments_open() && !pings_open() ) {
                                
    // Comments are open, Pings are not ?>
                                <?php _e('You can skip to the end and leave a response. Pinging is currently not allowed.''kubrick'); ?>

                            <?php } elseif ( !comments_open() && !pings_open() ) {
                                
    // Neither Comments, nor Pings are open ?>
                                <?php _e('Both comments and pings are currently closed.''kubrick'); ?>

                            <?php edit_post_link(__('''kubrick'),'',''); ?>

                        
                    </p>    

                </div>
            </div>

        <?php comments_template(); ?>

        <?php endwhile; else: ?>

            <p><?php _e('Sorry, no posts matched your criteria.''kubrick'); ?></p>

    <?php endif; ?>

        </div>

    <?php get_footer(); ?>

  4. #4
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    205
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    in fact you have to remove this <?php get_sidebar(); ?> from the top and put it just Before the <?php get_footer(); ?>

    I see that you are using the Old old Default Wordpress theme : Kubrick... it will cause a lot of problems because it's no more compatible with the new Wordpress archive... and this was replaced by the Default TwentyTen, Twentyeleven and Twentytwelve Themes... so better you use one of them....

    Goodluck

  5. #5
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deadmix View Post
    in fact you have to remove this <?php get_sidebar(); ?> from the top and put it just Before the <?php get_footer(); ?>
    Fixed

    I see that you are using the Old old Default Wordpress theme : Kubrick... it will cause a lot of problems because it's no more compatible with the new Wordpress archive... and this was replaced by the Default TwentyTen, Twentyeleven and Twentytwelve Themes... so better you use one of them....
    Does the link breaks because I use the old theme or for some other reason e.g. code error etc.? Also, which is the best compatible WP theme these days? I don't wanna go thru the whole process again just to know at the end this theme is no longer supported/compatible etc.

  6. #6
    SitePoint Addict deadmix's Avatar
    Join Date
    Jun 2009
    Location
    france
    Posts
    205
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 810311 View Post
    Does the link breaks because I use the old theme or for some other reason e.g. code error etc.? Also, which is the best compatible WP theme these days? I don't wanna go thru the whole process again just to know at the end this theme is no longer supported/compatible etc.
    This theme use old structure... sure that will display correctly...etc but when you will need to integrate a code or using a plugin that will make a lot of conflicts which will give you a lot of errors like the one you have now... If you try your content with the Twentyeleven theme for Example Im sure all Work Correctly !? Right !?

    So the problem is the old theme and not your Code...

    Goodluck

  7. #7
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deadmix View Post
    ... If you try your content with the Twentyeleven theme for Example Im sure all Work Correctly !? Right !?
    So the problem is the old theme and not your Code...
    Got ya. Thanks. Will try Twentyeleven theme.

  8. #8
    SitePoint Zealot 810311's Avatar
    Join Date
    Mar 2010
    Location
    Canada
    Posts
    132
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I just double checked the theme I have customized and this is not Kubrick theme but this one. Sorry for the confusion. Is it still better to use twenty twelve or twenty eleven..?



    By Michael Heilemann
    Version 1.7.2

    The default WordPress theme that graced version 1.5 to version 2.9, based on the famous Kubrick.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •