PHP goodies for kicker/footer?
I just noticed that, at least in ATA 3.4.4, you can add PHP in the Edit Post/Pages area. Yes! I've never done that, and I'm trying to figure out a cool way to use this. Any ideas, anybody?
For instance, I think you could use PHP to make a certain plugin run at the bottom of just a certain page, or category. I'm sure there are great uses for this. Care to brainstorm? How would you use this wonderful idea? |
Here is one idea, I didn't like the 'Add to Any' plugin icons at the top of my posts, I wanted them part of the post's footer
1) I took the 'Add to Any' plugin code: HTML Code:
<?php echo '<ul class="addtoany_list">'; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); echo '</ul>'; ?> 3) I added it to the end of the FOOTER of the Posts (ATO->Edit POST/PAGE INFO ITEMS->FOOTER: Homepage - also did it for the 'FOOTER: Multi Post Pages' and 'FOOTER: Single Post Pages') so the FOOTERS look like this HTML Code:
%date('F jS, Y')% | %tags-linked('Tags: ', ', ', ' | ')% Category: %categories-linked(', ')% | %comments('Leave a comment', 'One comment', '% comments', 'Comments are closed')% %edit(' | ', 'Edit this post', '')% You can see how it looks at Call of the Muse |
Looks good. I've done that too, just using the Share/save plugin's config info. You get to say where you want it to show up, so that's easy!
I guess you could use it to display an image, right? |
sure, since you can put in any PHP in you could do a simple <image..> or if you only wanted it on the frontpage
'<?php if (is_front_page() { echo '<image...>';} ?> |
One of my ATA sites has a multi-author blog. I use the following snippet of code in the kicker to display the author's avatar:
PHP Code:
|
I have used this in the byline with :
<?php if ( in_category('490') ) { echo '<div id="divBod"><img src = "http://travelhorizonstyle.com.au/wp-content/uploads/5percent.png" /></div>';} ?> With 'CSS Inserts' : #divBod {float: right; width: 20%; z-index:1;} However it in IE8 (not FireFox & Chrome) it truncates the excerpts box on the right side. This is really a css styling issue, but just in case anyone has any suggestions. |
All times are GMT -6. The time now is 07:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.