Connor Crosby
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Latest Post Styled Different Than other PostsAlso, how can I use
<?php bloginfo('template_url'); ?>
inside my if statement for the thumbnail?When I do this, it doesn’t work:
<div class="entry-thumb"><?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail' ); else echo '<img src="<?php bloginfo('template_url'); ?>/images/default-thumb.png"/>'; ?></div>
Forum: Themes and Templates
In reply to: Latest Post Styled Different Than other PostsI got it to work by fixing that code and removing the second
endwhile
andendif;
however I need those secondendwhile
andendif;
in order to display the navigation links and if it doesn’t show up. Here is what my code is in pastebin:
https://wordpress.pastebin.com/rXNTGkXtForum: Themes and Templates
In reply to: Latest Post Styled Different Than other PostsI tried using that code both with the code for the loop added and without it and it came up with an error:
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in ../ConnorCrosby.net/wp-content/themes/cctheme/index.php on line 8
Line 8 would be theif( $counter == 1 ) { ?>
line. Thanks very much!Forum: Themes and Templates
In reply to: Latest Post Styled Different Than other PostsI tried using that however I get an error. Here is my code:
<?php if (have_posts()) : $counter = 1; while (have_posts()) : the_post(); if( $ counter == 1 ) { <div id="entry-featured"> <a href="<?php the_permalink(); ?>"> <div class="entry-thumb"><?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail' ); else echo '<img src="https://connorcrosby.net/wp-content/themes/cctheme/images/default-thumb.png"/>'; ?></div></a> <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <div class="entry-meta">December 12th, 2010 in <a href="#">News</a></div> <div class="entry-excerpt"><?php the_content(); ?></div> <div class="entry-more"><a href="#">Read More</a></div> <div class="clear"></div> </div> <!-- end entry-featured --> } else { <div class="entry"> <a href="<?php the_permalink(); ?>"> <div class="entry-thumb"><?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail' ); else echo '<img src="https://connorcrosby.net/wp-content/themes/cctheme/images/default-thumb.png"/>'; ?></div></a> <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <div class="clear"></div> </div> <!-- end entry --> } $counter++; endwhile; endif; ?>
Thanks!
Forum: Themes and Templates
In reply to: CSS Not WorkingYou were viewing that when I deleted a couple lines of code to see if that would correct the problem, that is why there were errors. I know there is still some left, but I will fix that later.
Forum: Themes and Templates
In reply to: CSS Not WorkingOh nevermind. When I updated my site (deleted a post) it shows the site normally, plus the CSS file updated.
Forum: Themes and Templates
In reply to: CSS Not WorkingIt shows a couple of errors, but wouldn’t it still at least show some elements. Here is the link by the way.
Forum: Themes and Templates
In reply to: Change CSS according to DateYes it works! Thank you so much!!
Forum: Themes and Templates
In reply to: Change CSS according to DateAwesome! I will test this and let you know if it works or not.
Forum: Themes and Templates
In reply to: the_shortlink How to show just link?This code also seems to work if you get rid of
get_theID()
from inside the parentheses.Forum: Themes and Templates
In reply to: the_shortlink How to show just link?It worked! All I did was copied this code
<?php echo wp_get_shortlink(get_the_ID()); ?>
and it shows up nicely. Thank you!Forum: Themes and Templates
In reply to: the_shortlink How to show just link?I changed it to
the_shortlink
and it now shows the post ID, however I would like for it to show the whole link (including example.com?=” or whatever it shows. Thanks!Forum: Themes and Templates
In reply to: the_shortlink How to show just link?I tried using that code and it does not work. I doesn’t show anything.
Forum: Themes and Templates
In reply to: Custom Smilies WP Theme*bump*
Forum: Themes and Templates
In reply to: WP 3 Menus not ShowingNever mind, I figured out the problem myself.