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 »

%category-linked% bug? It don't display the first assigned category for a post.


 
Prev Previous Post   Next Post Next
  #1  
Old Mar 30, 2010, 03:57 AM
conon
 
21 posts · Mar 2009
%category-linked% bug? It don't display the first assigned category for a post.

There seem to be problem with %category-linked% or %category%. It don't display the first category a post belongs to as it should for me.

I would like to display 1 category in the Byline and I need it to be the first category assigned to the post or alternatively exclude a specific category to be shown in the byline.

I use a 'Featured' Category that I assign to posts that I want to feature in Dynamic Content Gallery but I don't want the featured category to be displayed in the Byline. It should display the other Category (News, Post etc) that a post belongs to instead.

I have tried with this code in bfa_postinfo.php without luck:
PHP Code:
// 1st category, linked
    
if ( strpos($postinfo_string,'%category-linked%') !== FALSE ) {
        
$all_categories get_the_category(); 
        
//Default to first category
       
$categoryIndex 0;
       
       
//If first category is "Featured", select second category
       
if ($all_categories[$categoryIndex] == 10)
           
$categoryIndex 1;
        
$category $all_categories[$categoryIndex]->cat_name;
        
$category_linked '<a href="' get_category_link($all_categories[$categoryIndex]->cat_ID) .
        
'">' $category '</a>';
        
$postinfo str_replace("%category-linked%"$category_linked$postinfo);
    } 
I would appreciate any hint or help

Thanks

I use Atahualpa 3.4.6
Link to site: http://bit.ly/aTa8yB
 

Bookmarks

Tags
byline, categories, category, featured



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Display post title only of a category in a page ladylulu Page & Category Menu Bars 9 Mar 1, 2011 08:02 AM
[SOLVED] Edit Wordpress Category Page to just display Post titles??? dennis wilson Excerpts, Read more, Pagination 8 Mar 3, 2010 04:52 PM
Category Page Listing - How to display: Post Title only TotalBalance Excerpts, Read more, Pagination 16 Jan 27, 2010 12:22 PM
[SOLVED] Category / Archive display problem with category menu bar madfab685 Page & Category Menu Bars 4 Jan 2, 2010 04:12 AM
category pages - with just the linked title, author, date of each related post janey73 Atahualpa 3 Wordpress theme 2 Jun 25, 2009 01:11 PM


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


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