rebah
Forum Replies Created
-
Forum: Hacks
In reply to: Get […] after custom excerptI think that I maybe wasn’t clear enough about the custom excerpt, because now with your method I can’t define the characters of the excerpt anywhere, right?
My intention is this:
On my homepage I have the excerpt of my posts, and beside that I have a slider as header with the same posts. I want the excerpt in the slider to be shorter then the excerpt on the page below. That worked with the code in my first post, but without the […]Forum: Hacks
In reply to: Get […] after custom excerptI looked at the wp_trim_excerpt already, but I still dont know what to do. I’m a total newbie to code and WP.
Jamàl, I added this code to functions.php. Is that the right file?
Do I also have to change the code I used mentioned in my first post or should it just work. So far it doesn’t.Forum: Fixing WordPress
In reply to: Thumbs recent post widget not showingOk, I will. Tnx.
Forum: Themes and Templates
In reply to: Get slider header in line with columnsStrange. I thought i did. http://bit.ly/HIZWL4
[ Stop bumping. it’s not permitted here. If it’s really urgent then consider hiring someone. ]
Forum: Fixing WordPress
In reply to: How to make post headers on homepageOk, It was because of the size of my uploaded image. By accident I noticed that it worked after I downsized the image. Thanks for all your alchymyth!
Forum: Fixing WordPress
In reply to: How to make post headers on homepageI already had a new functions.php, so I added the image size there and referred to it.
What I now run into is that I can change the size of the image, I can see it work. But the image always stays in its original proportion, even when I’m setting the height en width for example at 620×180. Then the image becomes 270×180. I’ve tried crop true and false, but there is no difference between the two.Forum: Fixing WordPress
In reply to: How to make post headers on homepageThat was it! Great, thank you.
One more question, I want the image to have specific dimensions. Now I read that i have to add this line
<?php add_image_size( $name, $width, $height, $crop ); ?>to my wp-includes/media.php to set an imagesize. I can’t get to that file at the moment because I am at work, but do I have to make a child version of this file too? If yes, do I copy it whole and to which folder?
Forum: Fixing WordPress
In reply to: How to make post headers on homepageOk, I have.
Now I added the line there:<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_sticky() ) : ?> <hgroup> <?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3> </hgroup> <?php else : ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php endif; ?>But nothing happends. Wrong place? Wrong code?
Forum: Fixing WordPress
In reply to: How to make post headers on homepageOk, I’ve tried adding the code
<?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?>in content.php in the child theme and the normal one, but then I get no posts at all on my page.
Is this the right code and where do I have to put it.I also added
if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); }in my child theme functions.php because I couldn’t find it in the original functions.php.
Forum: Fixing WordPress
In reply to: How to make post headers on homepageEverything 🙂 I have to Google eacht step. I am already using a child theme. But not with a content.php yet. I made a new content.php with only no code:
<?php /* Custom code goes below this line. */ /* Custom code goes above this line. */ ?>I’m assuming I don’t have to add support for Post Thumbnails, because I can already select a featured image when I write a post.
So I have to add
<?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?>
to functions.php?If I put that in my child theme, how do I get it above the title?
Or do I just past the whole code in the new functions?Is this the right place?
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_sticky() ) : ?> <hgroup> <?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3> </hgroup> <?php else : ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php endif; ?>I hope I’m at least close to the right way to do this.