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 »

'Read More' not displaying on custom category-posts-in-a-page


  #1  
Old Feb 27, 2010, 11:11 AM
maija
 
4 posts · Nov 2009
The WP "Read More" (<!--more-->) works on the home page and in a regular WP category page, but it doesn't work (ie. the full post is displayed) on the page template I have created that displays category posts.

I found this thread:
http://forum.bytesforall.com/showthread.php?t=2592

...which seems like the problem I'm having, but when I add $query_string. to query_posts the template stops working and displays nothing from the loop. I'm new to PHP so maybe I'm applying it incorrectly. This is what I have added before the loop:

PHP Code:
<?php
$catID 
0;
if (
is_page('news')) {
  
$catID=4;
} elseif (
is_page('photos')) {
  
$catID=5;
} elseif (
is_page('national-team')) {
  
$catID=18;



if (
$catID) {

   
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
   
query_posts("cat=$catID&paged=$paged");
   
?>
query_posts($query_string. "cat=$catID&paged=$paged"); makes everything from the loop disappear.

Last edited by maija; Mar 8, 2010 at 05:31 PM.
  #2  
Old Mar 2, 2010, 04:16 PM
lknyc
 
1 posts · Mar 2010
Hello,

I am having a similar problem.

PHP Code:
<?PHP /* This is added in based on http://forum.bytesforall.com/showthread.php?t=207 to create a category post page */
    
query_posts('cat=13'); ?>
    
    
    <?php /* The LOOP starts here. Do this for all posts: */
    
while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
I am trying to create a custom page using templates that will display a specific category. Everything works except the pagination. When I press "Older Articles", it just refreshes and shows the same posts on page 1.

Thanks for your help in advance!

  #3  
Old Mar 8, 2010, 05:29 PM
maija
 
4 posts · Nov 2009
Incidentally, though it didn't work before, I bashed again at all the options and this worked:

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

...added after the query_posts(), as suggested in the thread I linked above. I don't know why it didn't work before. I must have goofed something up. Or maybe I tried it in combination with adding $query_string. to query_posts, which did not work. My apologies for what turned out to be a redundant thread.

lknyc, your problem is different. The issue I was having was with the "Continue reading..." link that you can insert into long posts in Worpress. You are talking about older/newer links to other posts, rather than within a post. My php works for that so you might want to copy & paste it (adding the global $more; stuff above) and modify it to your own use.

Last edited by maija; Mar 8, 2010 at 05:32 PM.

Bookmarks

Tags
category, full post, read more, template

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No read more on category page jlh_hunt Page & Category Menu Bars 0 Jan 30, 2010 04:52 PM
Displaying Posts Using a Custom Select Query Thomas Center area post/pages 0 Dec 28, 2009 09:14 AM
[SOLVED] Custom nav. bar not displaying makeitrein Header configuration & styling 3 Dec 2, 2009 09:09 PM
wp-custom-fields-search Results Not displaying Byline/Footer joan Plugins & Atahualpa 1 Sep 17, 2009 11:38 AM
Having a problem with my custom header displaying using FireFox als_lespaul Header configuration & styling 2 Jan 26, 2009 09:21 PM


All times are GMT -6. The time now is 12:41 PM.


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