Yes it is possible in WordPress, however that all depends on how the theme is coded of course.
Thread Starter
ghaib
(@ghaib)
Well, the theme is coded like any other WP theme.
That really doesn’t help much as there are thousands of themes available nowadays and almost each one is coded slightly differently. Do you have a live website so I can take a look at the code or do you have a theme in mind that you want to use?
@ghaib
even in your example link, the title is outside the content; only the image is shown to the right of the title and content, which could be done using the_post_thumbnail() in its own div, for instance.
http://codex.ww.wp.xz.cn/Function_Reference/the_post_thumbnail
unless you can provide the name of the theme that you are planning to use, and/or a link to your site, nobody will be able to help in any substantial way.
general, there are possible ways to ‘push’ the title into the content.
for instance, you could replace:
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
with something like:
<?php $text = '<h2>' . the_title('','',false) . '</h2>' . get_the_content(); echo apply_filters('the_content', $text); ?>
i am however not sure how this would help you to achieve a layout as in your example link.
Thread Starter
ghaib
(@ghaib)
@alchymyth I applied your code, it seems to be working.
In essence, what I want is the title (h2) to be included in the same <div> as the content, usually it’s:
<h2>Test title</h2>
<div class="content">The content</div>
What I’d like to achieve is something like this:
<div class="content">
<h2>Test title</h2>
The content</div>
While your code works, what if I want to wrap the title in additional divs, and have it be a link as well?
what if I want to wrap the title in additional divs, and have it be a link as well?
should be no problem – simply try it.
Thread Starter
ghaib
(@ghaib)
I tried, I’m getting this error:
syntax error, unexpected T_LNUMBER
I think it’s because I also include the comment code <?php comments_popup_link('0', '1 ', '% '); ?> right after the title (in a div).
Any ways of fixing this? (I’m not a php wiz 🙂 )
Thanks!