Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

limit tags on excerpts


  #1  
Old Oct 12, 2010, 10:24 AM
eperon
 
11 posts · Aug 2010
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.
  #2  
Old Oct 12, 2010, 10:52 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 13, 2010, 04:10 AM
eperon
 
11 posts · Aug 2010
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";
}
?>

Last edited by eperon; Oct 13, 2010 at 04:41 AM.
  #4  
Old Oct 13, 2010, 04:26 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 13, 2010, 05:28 AM
eperon
 
11 posts · Aug 2010
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', '')%

Last edited by eperon; Oct 13, 2010 at 06:41 AM.
  #6  
Old Oct 13, 2010, 06:02 AM
juggledad's Avatar
juggledad
 
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('&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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit Image Sizes wadams92101 Atahualpa 3 Wordpress theme 4 Aug 27, 2010 11:38 AM
8MB download limit hoopspeak Atahualpa 3 Wordpress theme 1 Mar 29, 2010 05:54 PM
[SOLVED] Make excerpts ignore HTML tags when counting? daniel3ub Excerpts, Read more, Pagination 2 Nov 16, 2009 07:51 AM
Limit the number of posts per page mcgiver058 Atahualpa 3 Wordpress theme 1 Aug 20, 2009 09:01 PM
Limit Plugins ? JBWhite Plugins & Atahualpa 3 Apr 23, 2009 11:09 AM


All times are GMT -6. The time now is 10:28 AM.


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