Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   limit tags on excerpts (http://forum.bytesforall.com/showthread.php?t=10248)

eperon Oct 12, 2010 10:24 AM

limit tags on excerpts
 
I have split the center column according to the manual described on this forum. However, I dislike how the tags mess up the placement of the excerpts.

Is there a way to limit the amount of tags shown on excerpts, or remove them from ONLY the excerpts and not the first full posts on the homepage?

so 1 or 2 full posts on the homepage with categories and tags, with below that two columns with excerpts, with limited or removed tags.

Limited would be preferred, but removed is acceptable too.

juggledad Oct 12, 2010 10:52 AM

take a look at the options at ATO->Edit POST/PAGE INFO ITEMS->FOOTER: xxxxxxxxx
look at the items available and you could add php to test if it is an excerpt and display the tags or not.

eperon Oct 13, 2010 04:10 AM

yes i figured it should go in there. I dont know anything about php but after looking up some tutorials i figure it must be something like

<?php
if (post = excerpt)
{
%tags-linked('&nbsp; <image(tag-gray.gif)> ', ', ', ' &nbsp; ')% ;
}
?>

the thing i'm stuck at is how to find out the real variablenames of 'post' and 'excerpt'...


EDIT:

i tried these things by digging through the functions.php and copying code from there, but so far without result:

TEST1

<?php
if (count($words) = $post_content_length)
{
%tags-linked('&nbsp; <image(tag-gray.gif)> ', ', ', ' &nbsp; ')% ;
}
?>


TEST2

<?php

global $bfa_ata, $post;

if ( '' <> $text ) {

echo "test tags";
}
?>

TEST3
<?php
if ($post_content_length > 60)
{
echo "test tags";
}
?>

juggledad Oct 13, 2010 04:26 AM

WordPress has some built in conditional tags - see: http://codex.wordpress.org/Conditional_Tags

eperon Oct 13, 2010 05:28 AM

it says there is only 1 conditional excerpt tag in wordpress, which is has_excerpt()

so then it would be


<?php
if (has_excerpt())
{
%tags-linked('&nbsp; <image(tag-gray.gif)> ', ', ', ' &nbsp; ')% ;
}
?>


however, this results in the tags being displayed on all posts and with a code displayed after the tags

; } ?>


apparently the php doesnt get read well in the footer box...



the entire code in the footer homepage box is like this

<image(folder-gray.gif)> %categories-linked(', ')%

<?php
if (has_excerpt())
{
%tags-linked('&nbsp; <image(tag-gray.gif)> ', ', ', ' &nbsp; ')% ;
}
?>


%edit(' | ', 'Edit', '')%

juggledad Oct 13, 2010 06:02 AM

Hmmm it appears that there is no test to see if a post is being displayed as an excerpt. You could use this
HTML Code:

<image(folder-gray.gif)> %categories-linked(', ')%
<?php global $bfa_ata;
if ($bfa_ata['excerpts_home']) { ?>

%tags-linked('&nbsp; <image(tag-gray.gif)> ', ', ', ' &nbsp; ')%
<?php ;}
?>

%edit(' | ', 'Edit', '')%

but it will display the tags for all posts if you have the option 'ato->Configure EXCERPTS->Posts or excerpts on HOME page?' set to 'Only Excerpts' even if you are set to display the full posts even if 'Show the first X posts on HOME page as full posts?' is greater than one.

eperon Oct 13, 2010 06:41 AM

yeah that is exactly how i have it setup (with show full greater than 0, not greater than 1).

well, then i guess i have to give up on this. thanks for trying though...


All times are GMT -6. The time now is 08:50 PM.

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