Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter jasonjasonjason

    (@jasonjasonjason)

    @andrew,

    i just checked my old WP – and the index was 15 Posts long per Pagination. so the viewport returning to the top was actually essential to it working ?? i’ll chalk this problem up to me not being familiar to how WP normally functions.

    my Pages will never (famous last words) have more than three Posts displayed at a time. so being able to set the point where the Viewport scrolls up to, would be fantastic.

    i would prefer to avoid using a Plugin as they usually add another step to entering content. are Anchors something you code into the .php files themselves?

    thanks!

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    @andrew,

    on checking with my old page, i have the first 15 Posts load on the index. so Navigation wouldn’t work very well without having the viewport reset to the top of the page ??

    so i suspect it’s just a case of my being ignorant to the normal function of WP Post navigation.

    Are you happy to use anchors to resolve this?

    i would most prefer to avoid using a Plugin to do this, so if Anchors are something i can code into the page.php (for example) to preserve the viewport “location” on Post navigation… that would be great.

    my pages will all have the Posts at the bottom, so preventing the scrolling to the top will kind of make-or-break my whole idea ??

    thanks!

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    @andrew,

    i have nothing to change any standard browser behavoir. but i seem to rememeber on WP’s i’ve seen elsewhere, that clicking “next” / “previous” nav icons would leave the main body of the Page alone, and only refresh the content?

    it’s possible i’m remembering in correctly…

    maybe the annoying need to scroll up and down is less noticible with pagination of 5 or 6 Posts at a time, VS single Post on a page.

    the closest i’ve seen to anyone referencing a problem similar to mine was suggestions to set different “anchors” for the scrolling points on a page, but that was related to a navigation Plugin.

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    @jason king,

    ah ha. that is much easier, and gives me exactly what i need.

    thanks!

    good afternoon,

    without a sample of your code i can’t say with certainty… but the first thing i would check (because i had troubles with the same problem) is if the header image is positioned absolutely, while the rest of the content is dynamic.

    absolute content will display over the top of or underneath other content depending on where in the file it is coded. as in, the page is rendered from top to bottom and elements are stacked accordingly.

    you may also want to check the z-index for elements, as this can (sometimes) override the render order.

    if your header and the title are both set heights, you can try rearranging which is coded first in your html.

    i just looked at your page (firefox/ubuntu) and it all seems to be loading correctly. although the composition kind of breaks when you make the window very very small… i’m not sure if window size is what you mean when you said “responsive”. you may want to add a “min-width” tag to your body.

    cheers ??

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    the code is breaking in a very strange way…

    it works perfectly for the first two results, and then does something strange for the third (and final) result.

    when i view the source for the resulting page, it has appeneded “_thumb” twice onto the last timage. not “_thumb.jpg_thumb.jpg”, but “_thumb_thumb.jpg”

    my first assumption was i had incorrectly named the last picture. but checking the upload folder in WP, it shows all three test files are named identically :/

    <?php      $args2=array(
          'showposts'=>3,
         'post_type' => 'page'   );
    
    $my_query = new WP_Query($args2);
    if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    
      <?php $imgID = get_post_thumbnail_id($post->ID);
            $featuredImage = wp_get_attachment_image_src($imgID, 'full' );
            $imgURL = $featuredImage[0];
            $imgIconURL = str_replace('.jpg', '_thumb.jpg', $imgURL);  ?>
    
    <div class="flex-item_2">
      <div class="tape">
       <img src="<?php echo $imgIconURL ?>"> <!-- Title Section content -->
       <span class="writing"> <?php echo substr(get_the_title(), 0,20); ?> </span>
      </div>
    </div> <!-- div "flex-item" -->
    
    <?php endwhile;} ?>

    so, i basically end up with “sample1_thumb.jpg” “sample2_thumb.jpg” and “sample3_thumb_thumb.jpg”. even though my files are all named “sampleX_thumb.jpg”.

    i don’t see why it would change on the third iteration of the loop??

    EDIT :
    i deleted all traces of the third entry, and added it again. this time it worked fine. must have been some glitch in the matrix ??

    on the plus side, i just learned about the neccessity of including the functions.php and how to include theme support for post-thumbnails. sheesh.

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    that worked like a charm!

    you are a splendid and wonderful creature, linux4me2, may your days be bright and full of donuts ??

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    good evening,

    i ended up solving the problem by starting over!

    not the best solution for anyone who has already sunk a significant amount of time into their localhost installation… but after trying various fixes, and none of them being successful, i decided to do a fresh install and follow a different walkthru

    https://www.liberiangeek.net/2015/06/how-to-install-wordpress-on-ubuntu-15-04-server/

    i followed this guide – even though i’m running xubunutu on the VB – and everything works perfectly. WP and themes update without problems, and i didn’t even need to change any write permissions.

    thanks!

    Thread Starter jasonjasonjason

    (@jasonjasonjason)

    Something to remember in the future: never, ever use opsys-based commands like apt-get (Ubuntu) or yum (RHEL/CentOS) to install web applications. They will always be out of date, and you will be forced to immediately upgrade.

    dang it!

    You should be able to update WordPress from its admin panel. If you do not see an update notice, then the version installed by apt-get has been modified to prevent WordPress from “calling home”. In that case you will need to start from scratch and install WordPress per its installation instructions.

    double dang it!

    thanks for your answer, Dion… i was sadly expecting that was going to be the case. at least i’ll get to find out how effective the “images” feature of virtualbox is. i made one just after installing LAMP, but prior to installing WP

Viewing 9 replies - 16 through 24 (of 24 total)