• Hi,

    I am trying to make some small changes to Pinpress theme but I’m not completely successful with doing that. The first thing I tried to do is to add a sidebar to the homepage. I don’t know any php but I simply added
    <?php get_sidebar(); ?>
    after the get_header line and the homepage content and the sidebar overlapped. I changed
    <div id="col" style="width:100%;" class="column">
    to
    <div id="col" style="width:72%;" class="column">

    and it seemed to work. I didn’t want one search box at the top and another at the footer so I removed the line
    <div class="searchform_footercover"><?php get_search_form(); ?>
    and this seemed to work, too. However, these changes made me have a buggy homepage for the mobile devices. When I visited my website from my mobile website, I noticed that the unwanted search box came back and the content and the sidebar overlapped (while the sidebar becomes a footer – it is at the bottom of the page – in the single-content pages, i.e. blog posts).

    What am I missing? How can I make sidebar work exactly the same as it works on single content pages, any idea? Additionally, how can I get rid of double search box on lower resolutions?

    Additionally, how can I translate the theme? Most part are independent from the theme but some strings like “replies, leave a reply, categories, tagged in”, etc., needs translation and I do not know which files/which parts to edit to do the translation.

    Here are some screenhots:
    https://imgur.com/lsAms7e
    https://imgur.com/XSPsnjI

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter memet_

    (@memet_)

    Double search box problem solved by removing line 37, that is
    <div class="searchform_headercover"><?php get_search_form(); ?></div>
    from header.php.

    The overlapping problem is still not solved.

    Thread Starter memet_

    (@memet_)

    Problems are solved. My only problem is that I don’t know how to translate the theme to another language. Please help me if you can.

    For the solution of multiple search boxes and overlapping sidebar problem, look below:

    Tinkering around with it a bit more, I realized that I may be able to solve the problem with a few changes on site-content css class. Some attributes that singlepost has and site-content doesn’t have causes the sidebar work on sigle posts flawlessly and on the homepage with problems when the screen has a lower width than 768px (style.css, line 1402).

    I’ve found the problem.
    1. I removed style="width:100%;" from the line
    <div id="col" style="width:100%;" class="column">
    completely instead of changing it.
    2. When I first tried to add the sidebar to the homepage, I added the sidebar on the top of the php file under the header: this was a mistake. I added it at the bottom of the page, before the footer, and made the necessary changes in style.css after that. So the bottom of home.php reads:

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

    3. I added
    .site-content{width:72%;float:left}
    before the line
    .singlepost{width:72%;float:left}
    (line 1397) so that the homepage content will cover 72% of the screen on high-res screens and

    4. I added
    .site-content{width:100%;float:none;}
    before the line
    .singlepost{width:100%;float:none;}
    (line 1402) so that the homepage will cover all of the screen on low-res screens and behave exactly as the singlepost pages (widget area after the content)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar, search box and localization’ is closed to new replies.