• Resolved gmoney0918gmailcom

    (@gmoney0918gmailcom)


    I have been working on a wordpress site, and testing it at home on my machine locally using MAMP, now when I uploaded the site, the loops will not work any more. I have the jquery cycle plugin at the top of the page that should show posts with the category ID of featured

    <?php
    							$featured = new WP_Query();
    							$featured ->query();
    							while($featured->have_posts()) : $featured->the_post();
    
    								$wp_query->in_the_loop=true;
    								$featured_ID = $post->ID;
    
    						?>
    
    					<?php if(in_category('3')) { ?>
    
    					<?php if(get_post_meta($post->ID, 'large_preview', true)) { ?>
    
    						<div class="indF">
    
    							<img src="<?php echo get_post_meta($post->ID, 'large_preview', true); ?>" alt="Featured Post" />
    
    							<?php } ?>
    
    							<div class="featuredTitle"><!-- Title and Transparent Box -->
    
    								<p class="date"><?php the_time('M d'); ?></p>
    
    								<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
    
    								<p><?php the_excerpt(); ?></p>
    
    								<p class="meta">Written by <?php the_author_posts_link(); ?></p>
    
    							</div>
    
    						</div><!-- END FEATURED IND -->
    
                                                            <?php } ?>
    
    							<?php endwhile; ?>

    For some reason the cylce is working, but it shows that there is like 6 other posts as well, and I only have one Post at all.

    This all worked great on my machine locally, I am not sure why it would work there and not online. Any thoughts ???

Viewing 7 replies - 1 through 7 (of 7 total)
  • How did you upload the site? Did you install a fresh wordpress live and import the xml? Did you upload the database?

    When using the xml upload method, it will sometimes change the id of the categories.

    clear all your categories and pages, and add them in the desired order again, then fill the posts. Also don’t forget to install and setup all widgets/plugins

    your offline database isnt the same as your online database (in most cases)

    Thread Starter gmoney0918gmailcom

    (@gmoney0918gmailcom)

    I uploaded through coda. I did a fresh install of wordpress and started from scratch with everything. I changed the category to new ID number.

    I did not upload any xml.

    For some reason i feel like I am missing something simple.

    Thanks for your help.

    which files show up in your themes/your-theme/ folder?

    would be easier for us to find the problem if we have more insights of your source code

    Thread Starter gmoney0918gmailcom

    (@gmoney0918gmailcom)

    the site is https://www.theauburnleague.com

    the top is the featured post section and it will cycle through like 6 or 7 different posts….

    I looked in the page source and i got this message where the wp_query goes…

    <b>Warning</b>:  Missing argument 1 for WP_Query::query(), called in /home2/theaubur/public_html/wp-content/themes/Auburn League 2.1/header.php on line 143 and defined in <b>/home2/theaubur/public_html/wp-includes/query.php</b> on line <b>2521</b><br />
    Thread Starter gmoney0918gmailcom

    (@gmoney0918gmailcom)

    Oh I got it….I should have just read a little.

    I was missing something to pass through the query()

    i just changed it to query(”) and that did the trick.

    thanks for all your help

    alright, good stuff ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Theme not working when took Online’ is closed to new replies.