please somebody answer my questions its important to me!
i love talking to myself as always hehe
Your question makes no sense to me, and it perhaps not for others either.
the_title();
and the_content();
are 2 functions that are both used seperately inside the loop…
If you could explain in more detail what you want to archieve.
<div class="somedivclass">
<?php the_title(); ?>
<br />
<?php the_content();?>
</div>
Would most certainly work no problem…. (as an example)…
hi t31os, im sorry i didnt make myself clear. what i really wanna do is put the_title() (content of the_title()) inside the_content()(consisting of images and captions). I want the_title() inline with the caption and if possible its permalink. e.g
*************** Post#1
* * Some Description here
* image here * also here
* * also here
***************
i cant achieve that using just <DIV>ing the the_title() and the_content() right? doing so will just put result to this
Post#1
***************
* * Some description here
* * also here
* * also here
***************
u said also that the_title() and the_content() are two different things, i agree, thats why im having trouble positioning them they cant be mixed up. what am i gonna do? I hope you could help me with this thanks.
damn! my illustration sucks! asterisks there are formed as box containing image.please just figure it out thanks so much!
If you control the blog, why not just write the title of the post inside the content box?
hi jbbwcky! thanks for the reply men but its not that simple. i really wanna take advantage of the dynamic navigation feats of wordpress i want my “the_title()” displayed automatically as i post. its not just displaying the title.
You need to create a plugin to accomplish this.
something like
<?php
add_filter('the_content', 'myplugin_add_title');
function myplugin_add_title($content='')
{
$theTitle = '<div>' . get_the_title() . '</div>';
return $theTitle . $content;
}
?>
What this does is when “the_content” is called the filter runs this function. The function creates a variable that stores the title of the post surrounded by divs. Then when the function returns. It returns the title before the content.
Good luck.
On a 2nd note, I see this is in the Themes section. Have you tried just called “get_the_title()” from within the template?
Edit: not sure if this will really work…
hi theNETImp
thanks for the reply! i appreciate it. Im just not into plugins yet. anyway priorities have changed a bit. i’m reading this ebook and im getting close to that topic. Thanks!