Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   [SOLVED] Post info items with icons as parameter (http://forum.bytesforall.com/showthread.php?t=4907)

dextor Dec 16, 2009 01:56 PM

[SOLVED] Post info items with icons as parameter
Hi there,

I am trying to get some icon inserted in a post info item as a parameter like that:

%edit(' | ' <image(icon_page_edit.gif)>, 'Edit', '')%


%edit(<image(icon_page_edit.gif)>, 'Edit', '')%

while non of this works.

The icon should only be displayed in the footer, if the user is logged in or has the
rights to edit a post. If I put it outside the info item it is being displayed all the
time and thats confusing...

Can anybody give me a hint how that works?

The documentation says:

"HTML and icons can be used, inside of parameters, too, just not inside the date item: "

But is does not explain how to use it...

Thanks for this great theme, hope somebody can help me out!



juggledad Dec 18, 2009 04:46 AM

You need to put it all inside some PHP. here is how you could get some text and an icon to appear it the user is logged in. Add theis to the end of the FOOTER options at ATO->Edit->POST/PAGE INFO ITEMS
HTML Code:

<?php if ( is_user_logged_in() ) { echo 'Hello world! <img src="http://yourdomain.com/wp-content/themes/atahualpa344/images/icons/key.gif" alt="The Key" /> '; } ?>

dextor Dec 18, 2009 08:05 AM

Hi Juggledad!

Thanks for the hint, that helped me working out how I can also change icons e.g. for comments open/closed posts like that:

%date('F jS, Y')% | <image(icon_folder.gif)> %categories-linked(', ')% |

<?php if ( comments_open() ) { ?> <image(icon_comment_new.gif)> <?php }
else { ?> <image(comment.gif)> <?php } ?>

%comments('Kommentieren', 'Ein Kommentar', '% Kommentare', 'Kommentare geschlossen')% %edit(<image(icon_page_edit.gif)> . ' | ', 'Bearbeiten', '')%

Atahualpa is the greates theme out there!!!



All times are GMT -6. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.