Displaying text in a post

Place for WordPress Themes related issues

Displaying text in a post

Postby wpblogger on Sat May 24, 2008 8:13 pm

Hello,

The CSS Gallery theme is wonderful! I saw it several months ago but just got around to installing it.

I read the instructions about linking the thumb to a full post and that worked for me. But I'd like to go a step further and write in some text in the WP post section and have it show up.

My goal is to start a web page review site with these features:

1. My home page displays a bunch of thumbnail images that show a screen grab of the sites I'm reviewing.
2. A user clicks on a thumb and gets sent to a post that displays the larger screeen grab at the top.
3. Under the large screen grab on the post are a few text paragraphs where I review the site.

I've been able to figure out how to do the first two items but can't see how to do # 3: including text under the large image on the post page.

I thought I read how to do this on your old forum but can't find it now. If this is possible can you explain how? Thanks!
wpblogger
 
Posts: 11
Joined: Sat May 24, 2008 7:59 pm

Re: Displaying text in a post

Postby Shabu on Sun May 25, 2008 6:35 am

File Name single.php

Find this:
Code: Select all
<img src="<?php $values get_post_custom_values("image"); echo $values[0]; ?>" alt="" /></a></p>


Add this line after above code:
Code: Select all
<div><?php the_content(''); ?></div>

And put your content on POST area.
Your donation will keep alive the free templates and support.
Don't contact me by email for support, email will be ignored.
User avatar
Shabu
Site Admin
 
Posts: 125
Joined: Wed Apr 23, 2008 8:35 am
Location: Dhaka, Bangladesh

Re: Displaying text in a post

Postby wpblogger on Sun Jun 01, 2008 9:54 pm

That worked... thanks!
wpblogger
 
Posts: 11
Joined: Sat May 24, 2008 7:59 pm

Re: Displaying text in a post

Postby milan22parmar on Mon Jun 16, 2008 3:41 am

it didn't work. After replacing that code, large image doesn't show up also post page displays text (content) with link provided to thumb.
milan22parmar
 
Posts: 4
Joined: Sun Jun 15, 2008 7:10 am

Re: Displaying text in a post

Postby milan22parmar on Mon Jun 16, 2008 4:44 am

okey, it worked.
Thanks for the solution Shabu.
milan22parmar
 
Posts: 4
Joined: Sun Jun 15, 2008 7:10 am

Re: Displaying text in a post

Postby Shabu on Wed Jun 18, 2008 8:10 am

milan22parmar wrote:it didn't work. After replacing that code, large image doesn't show up also post page displays text (content) with link provided to thumb.


Read carefully first then take action. I did not asked to replace, I said to add the code after above code.
Your donation will keep alive the free templates and support.
Don't contact me by email for support, email will be ignored.
User avatar
Shabu
Site Admin
 
Posts: 125
Joined: Wed Apr 23, 2008 8:35 am
Location: Dhaka, Bangladesh

Re: Displaying text in a post

Postby layoutfriendster on Fri Mar 13, 2009 1:13 pm

i have a litle problem when put that code..the pic become two ..
one big n one again more litle than one...
layoutfriendster
 
Posts: 1
Joined: Fri Mar 13, 2009 10:10 am

Re: Displaying text in a post

Postby pink on Tue Oct 27, 2009 4:21 am

I have the same problem, do not hide the small picture as shown
pink
 
Posts: 7
Joined: Fri Oct 09, 2009 12:43 am

Re: Displaying text in a post

Postby pink on Tue Oct 27, 2009 5:49 am

I have the solution, I hope might help:
In <DIV>'s throw in CLASS
And in your CSS code adds the CLASS
Look at this example:

<div class="imga"><?php the_content(''); ?></div>

.imga {
border:0;
margin:0;
}
.imga a img
{
display: none;
}

that's all :P
pink
 
Posts: 7
Joined: Fri Oct 09, 2009 12:43 am

Re: Displaying text in a post

Postby rahulmehta on Wed Mar 17, 2010 9:48 pm

I did that,but full image size covering the square in the front page is not shown.
Is there any way that the image size is stretched so as to cover the whole small square section in the front page?
rahulmehta
 
Posts: 3
Joined: Wed Mar 17, 2010 11:30 am


Return to WordPress Themes

Who is online

Users browsing this forum: No registered users and 3 guests

cron