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 » Excerpts, Read more, Pagination »

[SOLVED] "Read more" on category template pages is dead


  #1  
Old Jul 22, 2009, 05:35 PM
mcphoto
 
120 posts · Apr 2009
Hi folks - got a strange one...

For this particular site, almost every page comes from a custom template (to allow us to use categories as a search/CMS menu).

So, I have dozens of templates with the following after the "get header" section (the top line makes the page display categories, the remaining lines I've pasted already exist in each PHP file - hope this shows you where the new line of code is pasted):

Code:
<?php query_posts('cat=44&showposts='.get_option('posts_per_page')); ?>


<?php // If there are any posts:
if (have_posts()) : $postcount == 0; ?>
<?php if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } // This is for the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ ?>

Works just fine, but in this theme, it eliminates the "read more" and shows the entire post.

You can see it in action at this link: http://landalerts.com

Click on any drop-down menu and you'll get a templated category page. Even the home page is a category page (I have to use templates for this, since the page-2-cat plugin just shows post titles).

On every post, there's a "MORE" tag after the first sentence. I've tried setting up a non-template page and the "more" works fine. Any ideas?

We don't want to go with excerpts for this function, as it's one more field for people to enter, and copywriters won't be entering data on this site.

Thanks for ANY help!!! MC
  #2  
Old Jul 23, 2009, 08:40 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You may have to add $query_string. to query_posts

<?php query_posts($query_string. 'cat=44&showposts='.get_option('posts_per_page')); ?>

Or add

global $more;
// set $more to 0 in order to only get the first part of the post
$more = 0;

after query_posts, or do both
  #3  
Old Jul 23, 2009, 09:23 AM
mcphoto
 
120 posts · Apr 2009
THANKS Flynn - it took both to make it work; my lack of php skills meant I had to try a few places with the paste, but works globally now - thanks for the quick help - MC

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to post on 2 seperate "Pages" or "Cats" TPR Atahualpa 3 Wordpress theme 18 Aug 4, 2010 08:24 PM
request: please add "links.php" page template. dhani Atahualpa 3 Wordpress theme 0 May 22, 2009 03:36 AM
My site keeps reverting to the "Default" template from Atahualpa! Leonardo T Dragon Atahualpa 3 Wordpress theme 3 May 8, 2009 01:40 PM
where can I rename "categories" and "Pages" into other titling? curious Atahualpa 3 Wordpress theme 5 Apr 28, 2009 03:15 PM
"read more" link does not appear after the excerpts in category pages vjoseph Excerpts, Read more, Pagination 2 Feb 5, 2009 04:01 PM


All times are GMT -6. The time now is 03:36 AM.


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