WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] showing all links in archive pages (11 posts)

  1. benbt-japan
    Member
    Posted 8 years ago #

    I have a list of links on the front page of my blog. But when you click on one Category link or an archive link then the page that appears does not show my links. It shows a few blog-internal links at the top but not the external links to other pages on my site that appear on the front page.

    I would be very grateful if anyone could point me in the right direction as to how I can get the links on the front page to appear on every page of the blog, be that an archive page or the front-page or a 'view post' page.

    And thanks for what looks like a fantastic piece of software to free me up to work on my site's content!

  2. digitalpen
    Member
    Posted 8 years ago #

    It would help if you could please post a few more details about your site.

    Could you tell me:

    1. The URL
    2. The theme you are using
    3. The location of your theme files e.g. /wp-content/themes/default/

    I'm suspecting that your problem has something to do with your theme's template files, but I have to check to be sure. Thanks!

  3. benbt-japan
    Member
    Posted 8 years ago #

    Sorry - let me give you the information you ask for:
    (1) http://www.language-global.com/blog
    (2) the default theme of the latest release
    (3) /wp-content/themes/default

    Thanks in advance for your help with this. I'm afraid I really don't know my way around the WP software yet so am fairly clueless.

    May I slip in one more quick question? I would like to make all the links on the right side of the page a little larger.

  4. digitalpen
    Member
    Posted 8 years ago #

    Okay, the WordPress default theme comes configured to show the "Links" and "Meta" section only on the front page. You're going to have to do a bit of editing in the template files to fix this.

    First, open up /wp-content/themes/default/sidebar.php in a text editor like Notepad. Then look for the lines:


    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    [...]
    <?php } ?>

    Change this to:


    <?php /* If this is the frontpage */ /* if ( is_home() || is_page() ) { */ ?>
    [...]
    <?php /* } */ ?>

    Save the changes and re-upload the file. That should fix your problem. In case you don't know the basics of PHP, what I did there is simply comment out the code that makes the "Links" and "Meta" section only load on the front page. The reason I didn't ask you to straight out delete it is so that if you ever need to restore it, you can simply undo the changes shown above.

    Hope this helps!

    N.B.: [...] just means that there's a bunch of code between the first line I showed and the last line.

  5. benbt-japan
    Member
    Posted 8 years ago #

    Thank you! That seems to have done the trick for the Archive and Category pages. Unfortunately, it doesn't work for pages which just display a post. For example, if you click on the 'read more' link under the test-post on my front-page, a new page is displayed with the whole post but no links down the side.

  6. digitalpen
    Member
    Posted 8 years ago #

    The WordPress default theme is designed such that the sidebar in not shown on single post pages. This is pretty easy to fix, though.

    Open up /wp-content/themes/single.php in a text editor like Notepad. First, look for the line:


    <div id="content" class="widecolumn">

    Change this to:


    <div id="content" class="narrowcolumn">

    Next, find the line right at the end of the file that reads:


    <?php get_footer(); ?>

    Add one line before this, so that it now reads:


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

    That should do the trick. Just save the changes and re-upload the file.

  7. moshu
    Member
    Posted 8 years ago #

    And what about the different bg image for single post view?
    The OP may want to search the Codex theme list for the All-Sidebar edition of K.

  8. digitalpen
    Member
    Posted 8 years ago #

    That's not hard to fix, either. You can edit the following lines in /wp-content/themes/header.php:


    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !$withcomments && !is_single() ) {
    ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>

    Just change it to read:


    <?php
    // Checks to see whether it needs a sidebar or not
    /* if ( !$withcomments && !is_single() ) { */
    ?>
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; }
    <?php /* } else { // No sidebar */ ?>
    /*
    #page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    */
    <?php /* } */ ?>

    But I guess moshu has a point. If you're not comfortable with all the editing, you may be better off looking for an all-sidebar version.

  9. moshu
    Member
    Posted 8 years ago #

    There is an all-sidebar version of that theme.

  10. benbt-japan
    Member
    Posted 8 years ago #

    Thanks digitalpen for your help. I've got the single post pages showing the sidebar now.

    By the way, the modification to the header.php file that you suggested produced a rather surprising result. The header image turned into a dull blue box with no nice curved corners. So I left that bit out. In any case, even with the sidebar showing in single-post pages, I don't have any trouble with the header image being the wrong size or anything like that.

    Thanks!

  11. BernardBlack
    Member
    Posted 7 years ago #

    Hey, thanks for asking and answering there guys :) Just what I was looking for ^_^ I figured out the first bit myself, but I couldn't think of why the links / meta / background wasn't there :P

    Thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.