Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • If you look at the code, the box size is 250×200. The problem is that it doesn’t resize the image, and it takes the original size of the image (as opposed to the resized image in the blog post). There is a theme that uses an image that you establish as the image you want for the index picture by marking it as “thumb” under custom fields.

    I don’t know php, so I’m not sure if I could tweak the code myself. It would be interesting to have that option, though.

    Jauhari, it has not. ??

    A very light blue doesn’t look bad. This hex code is: #236B8E

    See here: https://www.economicthought.net/?p=23

    A tried dark blue at first and it came out terrible. This doesn’t look bad, and you can actually see the links. I think subtle variations of any color will look good. The less is contrasts, the better.

    Open style.css.

    The relevant code is:


    a:link, a:visited {
    color: #0000;
    text-decoration: none;

    To change the color, change the hex number.

    Thread Starter JCataln

    (@jcataln)

    Thanks! Got it; it was single.php

    Thread Starter JCataln

    (@jcataln)

    Just thought I’d bump this for a response. Thanks!

    Thread Starter JCataln

    (@jcataln)

    To specify, the code I have so far is:

    <?php
    get_header(); ?>
    
    <div id="content-wrap">
    	<div id="content">
    
    <?php if ( $paged < 2 ) {  // Do stuff specific to first page  ?>
    
    	<?php if (have_posts()) : ?>
          <?php
    $sticky=get_option('sticky_posts');
    $args=array(
       'caller_get_posts'=>1,
       'post__not_in' => $sticky,
       'posts_per_page'=>1,
       );
          $my_query = new WP_Query($args);
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;?>
          <div class="xxxpost lastlast" id="post-<?php the_ID(); ?>">
    <div class="lastimage">
    <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><div class="pik" style="background: url(<?php the_post_image_url('medium'); ?>) center top no-repeat; width: 250px; height:200px; border: 1px solid #777;">
    </div></a>
    </div>
    
    <div class="atas-post"><?php the_time('F jS, Y') ?> - <?php the_time() ?> <!-- &sect; <?php _e('by'); ?> <?php the_author() ?>  --> &sect; in  <?php the_category(', ') ?></div>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <br />
    <p><i><b>Written by:</b>
    <?php the_author_posts_link(); ?></i></p>
    <br /><br />
    
    				<div class="entry">
    					<?php
    $content = get_the_content('read more');
    $content = apply_filters('the_content', $content);
    $content = preg_replace('|<img (.+?)>|i', '', $content);
    $content = preg_replace('|<div id="attachment_(.+?)" class="wp-caption(.+?)<\/div>|i', '', $content);
    echo $content;      ?>
    				</div>
    
    				<div class="postmetadata"><span class="lefter"><?php the_tags('Tags: ', ', ', ''); ?></span> <span class="righter"><?php edit_post_link('Edit', '', '  '); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></div>
    </div>
    
          <?php endwhile; ?>
    <br class="clear" />
    <?php
     $counter = 0; $counter2 = 0;
    $args=array(
       'caller_get_posts'=>1,
       'post__not_in' => $sticky,
       'paged'=>$paged,
       'posts_per_page'=>7,
       );
    query_posts($args);
    while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); 
    
     $counter++; $counter2++;
      ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<div class="<?php if ($counter == 1) { echo 'leftside'; } else { echo 'rightside'; $counter = 0; } ?>">
    <div class="atas-post"><?php the_time('F jS, Y') ?> - <?php the_time() ?> <!-- &sect; <?php _e('by'); ?> <?php the_author() ?>  -->&sect; in  <?php the_category(', ') ?></div>
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    <div class="theimage">
    <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><div class="pik" style="background: url(<?php the_post_image_url('thumbnail'); ?>) center center no-repeat; width: 150px; height:110px; border: 1px solid #777;">
    </div></a>
    
    </div>
    				<div class="entry">
    					<p><?php
    						$texter = get_the_excerpt();
    						if(strlen($texter ) > 300) {
    						$texter = substr($texter , 0, 300);
    						}
    						echo ''.$texter.'[...]';
    						?>
    						</p>
    				</div>
    
    <br />
    <p><i><b>Written by:</b>
    <?php the_author_posts_link(); ?></i></p>
    <br /><br />
    
    				<div class="postmetadata"><span class="lefter"><?php the_tags('Tags: ', ', ', ''); ?></span> <span class="righter"><?php edit_post_link('Edit', '', '  '); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></div>
    
    			</div>
    
    <br class="clear" />			</div>
    
    		<?php endwhile; ?>
    <br class="clear" />
    
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
          <div class="navigation">
            <div class="alignleft">
              <?php next_posts_link('&larr; Previous Entries') ?>
            </div>
            <div class="alignright">
              <?php previous_posts_link('Next Entries &rarr;') ?>
            </div>
          </div>
          <?php } ?>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>
    <?php } else { // Do stuff specific to non-first page ?>
    <?php
     $counter = 0; $counter2 = 0;
    $args=array(
       'caller_get_posts'=>1,
       'post__not_in' => $sticky,
       'paged'=>$paged,
       'posts_per_page'=>6,
       );
    query_posts($args);
     while (have_posts()) : the_post();
     $counter++; $counter2++;
    ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <div class="<?php if ($counter == 1) { echo 'leftside'; } else { echo 'rightside'; $counter = 0; } ?>">
    <div class="atas-post"><?php the_time('F jS, Y') ?> - <?php the_time() ?> <!-- &sect; <?php _e('by'); ?> <?php the_author() ?>  -->&sect; in  <?php the_category(', ') ?></div>
    <div class="theimage">
    <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><div class="pik" style="background: url(<?php the_post_image_url('thumbnail'); ?>) center center no-repeat; width: 150px; height:110px; border: 1px solid #777;">
    </div></a>
    </div>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    				<div class="entry">
    					<p><?php
    						$texter = get_the_excerpt();
    						if(strlen($texter ) > 300) {
    						$texter = substr($texter , 0, 300);
    						}
    						echo ''.$texter.'[...]';
    						?>
    						</p>
    				</div>
    
    				<div class="postmetadata"><span class="lefter"><?php the_tags('Tags: ', ', ', ''); ?></span> <span class="righter"><?php edit_post_link('Edit', '', '  '); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></div>
    			</div>
    			</div>
    
    		<?php endwhile; ?>
    <br class="clear" />
    
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
          <div class="navigation">
            <div class="alignleft">
              <?php next_posts_link('&larr; Previous Entries') ?>
            </div>
            <div class="alignright">
              <?php previous_posts_link('Next Entries &rarr;') ?>
            </div>
          </div>
          <?php } ?>
    
    <?php } ?>
    	</div>
    </div>
    
    <br class="clear" />
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    I don’t know where to add it so that appears in each individual post.

Viewing 6 replies - 16 through 21 (of 21 total)