• sendoushi

    (@sendoushi)


    Good afternoon for everyone,
    I’ll get straight to the point.

    I’ve created, tested and used the wordpress website under the domain https://www.DOMAIN.com/wp/ but when I finished the work I wanted to get it to https://www.DOMAIN.com so I went to general settings, changed the https://www.DOMAIN.com/wp to https://www.DOMAIN.com and then moved the files to https://www.DOMAIN.com.
    I have “More Fields” plugin so, I had to change all Custom Fields and how did I do that? Through PHPMyAdmin, directly on the database. On the “edit post” I couldn’t change because it would go always to the /wp/ link. So, I changed on the database, then I went to “Edit post” updated list and used the custom as it should. No problem here.

    The problem comes here… on my index I have the loop, the simple one:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    (I deleted the content because there is no problem with it)
    On the loop it only shows me 10 posts! I unpublished the later ones and published again, no change, changed the date of the later ones to “right now” and it appeared but then… only shows 10 posts, the other 10th post was gone. I created new posts… same… only shows 10 posts!

    On my single page I have this code:

    <?php
    $debut = 0; //The first article to be displayed
    ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<?php
    $myposts = get_posts('numberposts=-1&offset=$debut');
    foreach($myposts as $post) :
    ?>
    <?php endforeach; ?>
    	<?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>

    And it works fine! It shows all the posts. (I can’t use it on index because it will replicate everything)

    What should I do? Anyone knows what is going on?

Viewing 1 replies (of 1 total)
  • Thread Starter sendoushi

    (@sendoushi)

    Well… I’m kind of … The error was: on settings I had to show just 10 posts.

    Sorry.

    But by the way… what’s the best way to port a wordpress from one location to another?

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with loop…’ is closed to new replies.