|
#1
Oct 12, 2010, 10:24 AM
|
|
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.
|
#2
Oct 12, 2010, 10:52 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
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(' <image(tag-gray.gif)> ', ', ', ' ')% ;
}
?>
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(' <image(tag-gray.gif)> ', ', ', ' ')% ;
}
?>
TEST2
<?php
global $bfa_ata, $post;
if ( '' <> $text ) {
echo "test tags";
}
?>
TEST3
<?php
if ($post_content_length > 60)
{
echo "test tags";
}
?>
Last edited by eperon; Oct 13, 2010 at 04:41 AM.
|
#4
Oct 13, 2010, 04:26 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
WordPress has some built in conditional tags - see: http://codex.wordpress.org/Conditional_Tags
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
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(' <image(tag-gray.gif)> ', ', ', ' ')% ;
}
?>
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(' <image(tag-gray.gif)> ', ', ', ' ')% ;
}
?>
%edit(' | ', 'Edit', '')%
Last edited by eperon; Oct 13, 2010 at 06:41 AM.
|
#6
Oct 13, 2010, 06:02 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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(' <image(tag-gray.gif)> ', ', ', ' ')%
<?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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
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...
|
|