• Hi there!

    After taking a longer than expected break from blogging, I finally got back on the horse again and so I started by bringing everything up to date in the backend which included upgrading the Hamiltion theme from my outdated version 1.26 to 2.0.7.

    After modifying the design to match the customizations I had previously made in 1.26, there are two issues that I just can’t seem to fix.

    1. Too much white space on the bottom of paginated blog pages.

    I’m not using infinite scroll but your standard issue pagination yet there’s a lot of white space on the bottom of every following page except for the front page. This wasn’t the case with 1.26 (I went back and checked) but I can’t figure out where I can change it.

    First blog page (the way I want it to look everywhere): https://d.pr/i/hWhwgA
    Every other blog page: https://d.pr/i/LSC6Lo

    2. Customizing the introduction text on the first blog page

    Since the customizer box doesn’t allow for HTML styling, I added my own text in 1.26 via the index.php (see here: https://d.pr/i/niSVei). With version 2.07, the index.php has changed rather significantly and due to my lacking PHP skills I no longer know where to put my custom text. All my efforts resulted in having it not only show up on the front blog page but on archive pages as well.

    My workaround is to just use the old index.php from 1.26 but that’s probably not the best solution…

    I’d really appreciate any help ??

    Best,
    Matze

    • This topic was modified 3 years, 9 months ago by cinematze.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cinematze

    (@cinematze)

    The first issue kind of solved itself. Turns out it’s only a problem if there’s just one row of posts shown on each page. If there’s two or more, everything looks fine (although it wasn’t an issue at all with 1.26, hence my initial confusion).

    Theme Author Anders Norén

    (@anlino)

    Hi @cinematze,

    I’ll take a look at the first issue the next time Hamilton is updated. I’ll also dial down the escaping of HTML elements in the archive title a notch, so some formatting tags are allowed.

    For now, you can copy over index.php to your child theme and replace wp_kses_post( $archive_title ) with just $archive_title. After that, your HTML styling should be output.

    — Anders

    Thread Starter cinematze

    (@cinematze)

    Hi Anders,

    thanks so much for your reply!

    Unfortunately, your solution doesn’t seem to fix issue #2 but I’m not sure I explained it very well ??

    I want to show some html formatted text in the “introduction box” on the front page while I want the standard title behavior on archive pages (for example “#hashtagname” as title on a hashtag archive page).

    My new workaround is this: I replaced this part of the index.php

    <?php if ( $archive_title ) : ?>
    <<?php echo $archive_title_elem; ?> class="title"><?php echo wp_kses_post( $archive_title ); ?></<?php echo $archive_title_elem; ?>>
    <?php endif; ?>
    
    

    with this part

    <?php if ( is_home() ) : ?>
    <h2 class="title">Cinematze – Home of the <a href="https://www.cinematze.de">Cinematze Cast</a>, <a href="https://www.mademyweek.de">Made My Week</a> & <a href="https://www.podofshame.de">Pod of Shame</a></h2>
    <?php endif; ?>
    				
    <?php if ( is_archive() ) : ?>
    <<?php echo $archive_title_elem; ?> class="title"><?php echo wp_kses_post( $archive_title ); ?></<?php echo $archive_title_elem; ?>>
    <?php endif; ?>
    

    That seems to have done the trick but if there’s a more elegant/efficient solution to achieve this, kindly let me know ??

    Best,
    Matze

    • This reply was modified 3 years, 9 months ago by cinematze.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Two issues after updating from 1.26 to 2.0.7’ is closed to new replies.