Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member whippetkid's Avatar
    Join Date
    May 2010
    Location
    Scotland
    Posts
    123
    Member #
    22044
    Link:
    http://my-apartments.com/properties/...street-flat-1/

    On this page all items use a particular "properties template". On the right there is an include statement to include a rightside.php.
    In the right side I have a function to call posts from a particular category "properties".

    When I click on each one, they link to the particular property page. Which in turn refreshes the rightside.php bit on the right and forces it back to Page 1. So if I am on page 2 and click on a property. The refresh makes it Page 1 again. Which is awful.

    How can I resolve this? I've been struggling with it.

    Many thanks

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Set a variariable based on the main page ( page1, page2, page3 , whatever )... Modify your links on the "right side include", to capture the variable of the current page, then when they click on the links on the right side, and it reload the main page, query the variable to see what page needs to be loaded...

  4. #3
    Senior Member whippetkid's Avatar
    Join Date
    May 2010
    Location
    Scotland
    Posts
    123
    Member #
    22044
    Quote Originally Posted by Webzarus, post: 233016
    Set a variariable based on the main page ( page1, page2, page3 , whatever )... Modify your links on the "right side include", to capture the variable of the current page, then when they click on the links on the right side, and it reload the main page, query the variable to see what page needs to be loaded...
    Hi Webzarus, than you for your reply I am however having issues - can you please advise:

    The page itself uses wordpress.
    The asideright.php that is included on the right of every properties page template ( <?php
    include('asideright.php');
    ?> ) calls a content.php file which gets a list of posts in a category and pastes them. It then fires a new page out every 4 posts.

    The right side file contains this:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    'category_name' => 'properties', // Change these category SLUGS to suit your use.
    'paged' => $paged
    );
    query_posts($args);
    if( have_posts() ) :?>
    <div id="contactthing"><?php echo do_shortcode('[contact-form-7 id="125" title="properties contact"]')?></div><br /><br /><br /><br />
    <br />
    <div class="navig"><?php wp_pagenavi(); ?></div></br>
    <br />
    <?php while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( 'content', get_post_format() ); ?>

    <?php endwhile; ?>

    <?php else : ?>
    <article id="post-0" class="post no-results not-found">
    <header class="entry-header">
    <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
    </header><!-- .entry-header -->

    </article>

    <?php endif; ?>

    </div>

    The pagination is managed with the wp_pagenavi command implemented via this plugin:
    http://wordpress.org/extend/plugins/wp-pagenavi/

    I am unsure as to how to code as you have suggested regarding the variables etc. Could you elaborate as to where? And how it might look?

    Many thanks

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    1st off, I'm not a WP person, I'm sure you have much more experience with WP than me, also I know enough about php to make me dangerous.

    But I've done this a thousand times in asp applications that I build... Not much different than a search page that has 12 columns and you need to sort each column, but each search refs might have anywhere between 4 or 40 pages...

    It's a logic thing, you just have to ( in as simple of terms as I can ), modify the links on each portion of the page so they know what the other sections are doing, using variables...

    In other words, you need to catch the Main pages page identifier in the right section and redo the link to reflect that, then you need to catch the pagination number from the right side in the main page...

    Since the right side is a plugin, I'm assuming you have an editor in WP that Allows you to edit the plugin code... I'd start there, by trying to read the main page variable, and writing that out in the links to the pagination script. Meaning when you hover the link for 1 flat, it will not only show the page but the tab of the pagination script.

    Actually, that might be all you really need for this particular thing....

    I'll have to re-look at it when I get to an actual pc...

    Hope that's not too confusing.

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    I'm looking at this in Chrome and it seems to be working fine - did you fix it?
    I click on any of the Young Street properties and the right side shows a list of 4 properties - then if I click on page 2 (Dean crescent) if I click on any of those properties the right side remains as Dean Crescent, etc.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  7. #6
    Senior Member whippetkid's Avatar
    Join Date
    May 2010
    Location
    Scotland
    Posts
    123
    Member #
    22044
    Yes indeed, it's all fixed now....thank you so much Webzarus for your help!! Just had a chance to breathe after other fixes taking up time also, the joys!

  8. #7
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Sometime I over think and over write... It was toward the end of the last post I realized it was probably as simple as it was... Just sometimes hard to put the right logic in writing so someone outside my little brain can understand what I'm trying to say.

    Glad you got it working.

  9. #8
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Glad you got it working - if I'm ever over there, I'll want to stay at young Street! this is a website that makes me want to visit ASAP. Well done.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  10. #9
    Senior Member whippetkid's Avatar
    Join Date
    May 2010
    Location
    Scotland
    Posts
    123
    Member #
    22044
    Thanks guys.....I appreciate your help and positive feedback! : )


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

wordpress page reload

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com