the_content question
-
I installed social bookmark plugin.
The buttons are displaying between the article and the author bio.
<?php the_content('Read the rest of this entry »'); ?> <div class="postauthor"><?php the_author_description(); ?></div>How to make the author bio display JUST BELOW the ‘the_content’?
-
Please anybody help?
at the end of the the-content code line, add a
might work, might not – but this is basic html formatting and if you’re stuck, try http://w3cschools.com – they have lots of per command tutorials with loads of examples.
poo – wordpress stripped the tag I input
– use a line break tag ” br / ” inside pointy bracketshilite it and use that “code” button above the editor 🙂 (or just surround code by backticks)
See?
<br />I can not see the social bookmark button code to move it to after this line:
<div class="postauthor"><?php the_author_description(); ?></div>Problem is the socialbookmark plugin adding buttons between the content and my bio.
I CAN NOT ACTUALLY SEE THE BUTTON CODE.
Its a bit hard to follow your description. Is the button code present in source but the buttons are not visible when you view the page? If so, that sounds like a CSS problem to me. An URL might help, also.
<?php the_content('Read the rest of this entry »'); ?> <div class="postauthor"><?php the_author_description(); ?></div>In single.php and index.php, I am seeing the above code under ‘Editor’.
When I enable social bookmarks, the buttons are displaying correctly between the content and autor bio. BUT I AM NOT SEEING THE html code in single.php and index.php to move it below author bio.
Ok. I get it now.
Assuming this is the plugin you are using, the problem is that the plugin uses the
the_contentand thethe_excerptfilters to insert those buttons. This means that the code is not going to show up in your theme at all.I’ve been looking through the plugin’s code and so far I haven’t seen an easy way to echo those buttons. I’ll try to look around more later.
Yes. That is the plugin.
I tried to keep the code like this. (I am not a programmer.)
<?php the_content '<p>my name<br />my website<br />' ('Read the rest of this entry »'); ?>But it is not working either. Getting errors.
<?php the_content '<p>my name<br />my website<br />' ('Read the rest of this entry »'); ?>Just correct me the above code as I want author bio just below the ‘the_content’.
Pardon me for jumping in late, but if I understand correctly, the ‘Social Bookmarks’ plugin is inserting buttons between ‘the_content()’ and ‘the_author_description()’.
If that is the case, you cannot move the buttons with code in the theme files directly.
One possibility I think might work is to code your own filter for the_content() to add the_author_description(), and make your filter a lower priority than ‘Social Bookmarks’.
Here is code to add to your functions.php to append author description to the_content. If the bio appears after the Social Bookmarks buttons, lower the priority from 8 until it moves upl
<?php // Add author description to end of content function add_bio_to_content($content) { return $content . '<div class="postaurhor">' . get_the_author_description() . '</div>'; } add_filter('the_content','add_bio_to_content',8); ?>Note that you have to remove the line in index.php which gets the bio. Also, this will affect all places where the_content is called, which you may not want.
thank you! It worked like a charm.
The topic ‘the_content question’ is closed to new replies.