Forums

Different designs of Pages and insert categories manually? (14 posts)

  1. hampusjageland
    Member
    Posted 2 years ago #

    My work in progress website is http://www.projektblog.info.

    I have a few issues with it.

    1. I want to loose the dots in front of the lists.
    2. I want to manually design each page individually (based on same table as header)
    3. I want to insert a full archive list in one of the pages
    4. I want to insert categories manually in one of the pages
    5. Under recent posts I want the archive to only display the latest 4 months

    If any of this is possible I would really appreciate your help.

    Thanks heaps,
    Hampus

  2. @mercime
    Member
    Posted 2 years ago #

    1. In theme's style.css add this:
    ul { list-style: none; }

    2. If you're talking about the Page pages e.g. Your Information, Friends, Full Archive, etc., create Page Template - http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    If you're talking about Post pages, then you need a plugin. http://wordpress.org/extend/plugins/single-post-template/

    3. Check out http://codex.wordpress.org/Creating_an_Archive_Index
    or use plugin - http://wordpress.org/extend/plugins/clean-archives-reloaded/

    4. Not quite sure what you mean but check these out
    - http://codex.wordpress.org/Template_Tags/query_posts#Category_Parameters
    - http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query
    0r
    - http://codex.wordpress.org/Category_Templates

  3. hampusjageland
    Member
    Posted 2 years ago #

    That is so helpful! Thank you so much for you help! I'll give it a try in a bit and let you know how it goes.

    4. It's for the Editors page. There'll be 4 columns of information about the editors and I want to insert the actual category for each of them under the information so that you can go directly to their posts. Felix, hampus, johannes and friends are the categories. Or maybe it's easier to just create 4 posts and put them next to each other on the editors page...

    Thanks again!
    Hampus

    update:
    1. did't work at first but cracked it! worked when I just changes ul to li. Thanks! Awesome!

  4. hampusjageland
    Member
    Posted 2 years ago #

    Update

    1. Fixed with replacing ul with li.
    2. Fixed by using 4 different page templates, one for each link.
    3. Fixed using <?php wp_get_archives('type=monthly'); ?>
    4. still in progress(Could be possible, somehow, to do something like this? <?php get_category() ?> name of category?)
    5. still in progress

    Again, thanks for your help

  5. hampusjageland
    Member
    Posted 2 years ago #

    Is there an easy way of limiting the:

    <?php wp_get_archives('type=monthly'); ?>

    to only display the latest 4 months without using a plugin? Simply by editing the code?

  6. hampusjageland
    Member
    Posted 2 years ago #

    To display a specific category I did this:

    <?php
        // Get the ID of a given category
        $category_id = get_cat_ID( 'Johannes Berggren' );
    
        // Get the URL of this category
        $category_link = get_category_link( $category_id );
    ?>
    
    <a href="<?php echo $category_link; ?>" title="Johannes Berggren">Johannes Berggren</a>

    Works great! Thanks for the links mercime!`

  7. @mercime
    Member
    Posted 2 years ago #

    Cool hampusjageland, glad to see it's working out for you. As for the archives for last 4 months, try this:
    <?php wp_get_archives('type=monthly&limit=4'); ?>

  8. hampusjageland
    Member
    Posted 2 years ago #

    Worked out perfectly!

    Thank you so much for your help! Pretty much solved all the problems within just a few hours. Brilliant!

    The only problem left to fix is how to cut the excerpts to about 25 words on the index page and leave it full length or the single posts... no luck so far...

  9. jonimueller
    Member
    Posted 2 years ago #

    You'll have to do trial and error on the excerpt length. WP buries its default 55 *character* excerpt length in the code, but you can override this with whatever number you choose by putting this code in your functions.php file:

    // POST EXCERPT LENGTH IS SET HERE
    function my_excerpt_length($text){
    return 55;
    }
    add_filter('excerpt_length', 'my_excerpt_length');

    Where 55 is the value you decide upon.

    HTH.

  10. hampusjageland
    Member
    Posted 2 years ago #

    That's weird. Currently my text sits in the excerpts but still all the text is displayed.

    And when I try to put that code in I get an error message every time. I've tried a few different spots but nothing seems to work...

  11. hampusjageland
    Member
    Posted 2 years ago #

    It doesn't leave me with an error message anymore but still no difference on the website. This function, how do I call for it in the index file? Or does it change all excerpt wherever it is? Would I use something like

    <?php my_excerpt_length(); ?>

    ?

    Thanks!

  12. hampusjageland
    Member
    Posted 2 years ago #

    Figured it out, I had the text in the excerpt field when I updated the post. When I put the text in the actual post field the function works fine. It still applies same function to the text in the single post page though. Any way to prevent this from happening?

    Is there a way to apply a similar function but to the text in the excerpt field?

    My problem is that I need to change the position of the text to the right of the image in the single post (so that it aligns of the columns in the header) but can't figure it out without using the excerpt field and tables for the text.

    Another problem is that I can't seem to figure out how to change the size of the body copy, or the copy that I put in the posts. When I use the excerpt field I can just use the <h2> tags or whatever

    Really appreciate your help!

    Cheers,
    Hampus

  13. hampusjageland
    Member
    Posted 2 years ago #

    I fixed the space between the image and the text by inserting

    img { padding-right: 40px; }

    I could solve the problem with the text by using

    <?php the_content(); ?>

    and then somehow not display the images.

    Anyone got any suggestions?

    Cheers,
    H

  14. hampusjageland
    Member
    Posted 2 years ago #

    Everything is fixed now except for one tiny thing:

    function my_excerpt_length($text){
    return 28;
    }
    add_filter('excerpt_length', 'my_excerpt_length');
    
    function new_excerpt_more($more) {
    	return '...';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    to shorten the copy for the index page.
    The problem is that it's still shortened in the single post page.

    After that last thing, the website is finished!

    Thanks heaps for your help, all!

Topic Closed

This topic has been closed to new replies.

About this Topic