Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter yuriyWP

    (@yuriywp)

    thx for all help

    Thread Starter yuriyWP

    (@yuriywp)

    Ok its fixed what i did is called my bluehost hosting company and talked to them so what they did is searched the files and found out where the problem was coming from and that was from wp-includes folder so they when’t and restored that folder with all those files like few weeks back and it all worked just fine 🙂 yeah & like i sat in begining i was getting error log message of script-loader.php on line 835 and that file was in this folder wp-includes so it makes sense why it started to work. 🙂 my site is up and runing agen.

    Also for those that are looking for solution here is the link that might help you solve the blank site and pages and wp-admin page

    http://www.hightechdad.com/2009/06/10/fixing-blank-empty-or-white-wordpress-pages-after-upgrade/

    Thread Starter yuriyWP

    (@yuriywp)

    Go to Yuriy page and it will be blank or go in to gallery page’s also blank

    Thread Starter yuriyWP

    (@yuriywp)

    here is my site i forgot to anter it

    http://www.photoofcreation.com/

    Thread Starter yuriyWP

    (@yuriywp)

    UPDATE of the above code READ plz….

    for index.php this fallowing loop works grate

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') :1; query_posts('paged=' . $paged);?>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <!-- the loop code gove's here -->
    
    <?php endwhile; ?>
    <?php wp_pagenavi(); ?>
    <?php else : ?>
    <h2>No Posts Found</h2>
    <?php endif; ?>

    However for other pages like
    archive.php
    category.phg
    and so on use this looping style.

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <!-- the loop code gove's here -->
    
    <?php endwhile; ?>
    <?php wp_pagenavi(); ?>
    <?php else : ?>
    <h2>No Posts Found</h2>
    <?php endif; ?>

    Thats the update

    Thread Starter yuriyWP

    (@yuriywp)

    ok thank you keesiemeijer for all you help, I have solved it.

    For all of u that might have this issue here is my final code… 🙂

    This is how my loop look’s like in the index.php and all other pages like category.php archive.php basically the pages that have loop and pag-navi is required.

    index.php =

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') :1; query_posts('paged=' . $paged);?>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <!-- the loop code gove's here -->
    
    <?php endwhile; ?>
    <?php wp_pagenavi(); ?>
    <?php else : ?>
    <h2>No Posts Found</h2>
    <?php endif; ?>

    And this is the code that your functions.php file should have for this to work, and i have same thing.

    function my_post_queries( $query ) {
      // not an admin page and it is the main query
      if (!is_admin() && $query->is_main_query()){
        if(is_home()){
          // set the number of posts you want here
          $query->set('posts_per_page', 10);
        }
      }
    }
    add_action( 'pre_get_posts', 'my_post_queries' );

    Also notice that i have 10 post’s per page showing this number 10 should be the same as in your WordPress admin in here “setting -> Reading” and your “Blog pages show at most” should have same post_per_page number as the 1 in functions file, and you can change that number to what ever posts per page you want but change in both places…. Alright and thats all.

    Thread Starter yuriyWP

    (@yuriywp)

    Is there a way you could show me this in code example? on functions.php side?
    For some resone i cant get it to work.
    And how would my code look like in the index.php loop if i would change only to my functions.php file?

    thanks

    Thread Starter yuriyWP

    (@yuriywp)

    ok keesiemeijer i have tried this code in the functions

    if(is_home()){
          $query->set('posts_per_page', 10);
    }

    But still nothing so i changed it back to where it was however when i when’t to my loop thats in the index.php page i have changed the ‘posts_per_page=5 and it works like this

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('posts_per_page=5&paged=' . $paged);?>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <!-- loop code -->
    
    <?php endwhile; ?>
    		<?php else : ?>
            <h2>Not Found</h2>
            <?php endif; ?>

    But as soon as I change it to like 10 posts_per_page it brakes? any thoughts on this?

    Thread Starter yuriyWP

    (@yuriywp)

    ok sure this is my function.php page

    I have modified the loop a little in the index.php file to something like this
    AND its not showing me no error but it does gives me 2 extra pages.???
    Thanks for help.

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('posts_per_page=10&paged=' . $paged);?>
    		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <!-- all my code for the post -->
    
    <?php endwhile; ?>
    <?php else : ?>
    <h2>Not Found</h2>
    <?php endif; ?>
    <?php
    //this is my function.php file
    
    function my_post_queries( $query ) {
      // not an admin page and it is the main query
      if (!is_admin() && $query->is_main_query()){
        if(is_home()){
          $query->set('posts_per_page', 1);
        }
      }
    }
    add_action( 'pre_get_posts', 'my_post_queries' );
    
    // Thumbnail sizes
    add_image_size( 'bones-thumb-600', 600, 150, true );
    add_image_size( 'bones-thumb-300', 300, 100, true );
    
    // Sidebars & Widgetizes Areas
    function bones_register_sidebars() {
        register_sidebar(array(
        	'id' => 'sidebar1',
        	'name' => 'Sidebar 1',
        	'description' => 'The first (primary) sidebar.',
        	'before_widget' => '<div id="%1$s" class="widget %2$s">',
        	'after_widget' => '</div>',
        	'before_title' => '<h4 class="widgettitle">',
        	'after_title' => '</h4>',
        ));
    	if (function_exists('register_nav_menus')) {
    
    	register_nav_menus(
    		array(
    			'main_nav' => 'yuriyBlog_menu_1'
    		)
    	);
    }
    }
    
    // adding sidebars to WordPress
    add_action( 'widgets_init', 'bones_register_sidebars' );
    
    // Comment Layout
    function bones_comments($comment, $args, $depth) {
       $GLOBALS['comment'] = $comment; ?>
    	<li <?php comment_class(); ?>>
    		<article id="comment-<?php comment_ID(); ?>">
    			<header class="comment-author vcard">
    				<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>
    				<?php printf(__('<cite class="fn">%s</cite>'), get_comment_author_link()) ?>
    				<time><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s'), get_comment_date(),  get_comment_time()) ?></a></time>
    				<?php edit_comment_link(__('(Edit)'),'  ','') ?>
    			</header>
    
    			<?php if ($comment->comment_approved == '0') : ?>
           			<div class="help">
              			<p><?php _e('Your comment is awaiting moderation.') ?></p>
              		</div>
    
    			<?php endif; ?>
    
    			<section class="comment_content clear">
    				<?php comment_text() ?>
    			</section>
    
    			<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    
    		</article>
        <!-- </li> is added by wordpress automatically -->
    <?php
    }
    
    // Add support for Featured Images
    if (function_exists('add_theme_support')) {
        add_theme_support('post-thumbnails');
    	add_image_size('GeneralFuturedImage', 700, 315, true);
    } 
    
    ?>
    Thread Starter yuriyWP

    (@yuriywp)

    This is my index.php page’s code if its gana help….

    <?php get_header(); ?>
    <?php the_post(); ?>
        <div id="info_div">
        	<div id="location_text"><p><a href="<?php bloginfo('home'); ?>">Home</a></p></div><!-- location_text -->
            <div id="search_box">
            	<form id="searchForm">
                    <fieldset>
                        <div class="input">
                            <input type="text" name="s" id="s" style="color: #000; font-weight:700;"value="Enter your search" />
                        </div>
                        <input type="submit" id="searchSubmit" value="" />
                    </fieldset>
                </form>
            </div><!-- search_box -->
            <div id="clear" class="clear"></div>
        </div><!-- info_div -->
    
    	<div id="main">
    
        <?php // 'post_type'=>post, 'paged' => $paged, 'posts_per_page'=>10,'orderby'=>Date, 'order'=>DESC ?>
    	<?php $wp_query = new WP_Query(array('post_type'=>post, 'paged' => $paged, 'posts_per_page'=>10,'orderby'=>Date, 'order'=>DESC)); ?>
    		<?php while ($wp_query->have_posts()) : $wp_query->the_post(); wp_reset_query(); ?>
    
        	<div id="post_wrapper">
            	<div id="post_title"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div><!-- post_title -->
                <div id="posted_info">
                	<span><img src="<?php bloginfo('template_url'); ?>/library/images/post_line_devider.png" /></span>
                    	<table width="720" border="0" cellspacing="5" cellpadding="0">
                          <tr>
                            <td width="32" scope="col"><img src="<?php bloginfo('template_url'); ?>/library/images/post_calendar.png" /></td>
                            <td width="280" align="left"  scope="col"><strong><?php the_time('F jS, Y'); ?></strong></td>
                            <td width="200" scope="col">&nbsp;</td>
                            <td width="32" scope="col"><img src="<?php bloginfo('template_url'); ?>/library/images/post_comments_BG.png"  /></td>
                            <td width="146" align="left" scope="col"><strong><?php comments_number(); ?></strong></td><!--<php comments_popup_link (); ?> -->
                          </tr>
                        </table>
                    <span><img src="<?php bloginfo('template_url'); ?>/library/images/post_line_devider.png" /></span>
            </div><!-- posted_info -->
                <div id="post_descriptive_image">
                	<!--<a href="<?php //the_permalink(); ?>"><?php //the_post_thumbnail('GeneralFuturedImage');?></a>-->
                    <?php
    				// Must be inside a loop.
    
    				if ( has_post_thumbnail() ) {
    					the_post_thumbnail('GeneralFuturedImage');
    				}
    				else {?>
    					<img src="<?php bloginfo('template_url');?>/library/images/post_thumbnail.png"  />
    				<?php }
    				?>
                </div><!-- post_descriptive_image -->
                <div id="post_about_text">
                	<?php the_excerpt(); ?>
                    <span class="read_more_link"><a href="<?php the_permalink(); ?>">Read More...</a></span>
                </div><!-- post_about_text -->
                <div id="post_tags">
                		<p>Posted in: <?php the_category(', '); ?></p><!-- Categories -->
                        <?php the_tags('<span class="tags-title">Tags:</span> ', ', ', ''); ?><!-- Tag's -->
                </div><!-- post_tags -->
                <div id="post_sharing_content">
    
                    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>
                    <?php edit_post_link( $link, $before, $after, $id ); ?><!-- Edit This button -->
    
                </div><!-- post_sharing_content -->
                <div id="post_devider_img"><center><img src="<?php bloginfo('template_url'); ?>/library/images/post_devider.png" /></center></div><!-- post_devider_img -->
            </div><!-- post_wrapper -->
    
           <?php endwhile; ?>
    
        </div><!-- main -->
        <?php get_sidebar(); // sidebar 1 ?>
    
        <div class="navigation">
    
        <?php wp_pagenavi(); ?>
        	  <div class="alignleft"><?php previous_posts_link('&laquo; Previous') ?></div>
                    <div class="alignright"><?php next_posts_link('More &raquo;') ?></div>
        </div>
    
        <div id="clear" class="clear"></div>
    <?php get_footer(); ?>
    Thread Starter yuriyWP

    (@yuriywp)

    Well I created my own theme from scratch. The link will be http://www.photoofcreation.com/blog and the CSS is not done yeat on the comments side. Also I have lots of just dummy posts to test all, so if u look at the first post u will see “leave a Reply” I have left like 4 comments but they are not showing up and i have also unproved them, so they should technically show, but their not. Also would u like me to give u my comments.php code maybe that will help to solve this?
    And thx for helping 🙂

    Thread Starter yuriyWP

    (@yuriywp)

    Thanks “Digital Raindrops” thats exactly what i did and it’s perfect solution for my problem…
    Here is the code for those that want to know it 🙂

    What I did is created a loop and in this loop i sorted all of my post’s by the date of its publishing… Now if you want to move your post either front of the list or back all you would need to do is change your publishing date in the post and it will sort it out by the post’s date and thats it.

    <?php //this is my custom loop and in here you can see how i did all. ?>
    <?php
    				$wp_query = new WP_Query(array('post_type'=>sermongs, 'paged' => $paged, 'posts_per_page'=>10,'orderby'=>Date, 'order'=>DESC));
    				?>
    				<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    
    <!-- This is were the stuff would go, that would be looped -->
    
    <!-- Then i am closing my loop with this php code -->
    <?php endwhile; ?>
    Thread Starter yuriyWP

    (@yuriywp)

    Well it does work if I use it like this yymmdd but I would like to use it like this dd-mm-yyyy so people could understand it much easier. Is there a way i could use it like that and how come its not doing it like this dd-mm-yyyy?

Viewing 13 replies - 1 through 13 (of 13 total)