Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

Custom Read More with PHP


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Aug 23, 2010, 02:35 PM
adum's Avatar
adum
 
85 posts · Jun 2009
Custom Read More with PHP

Hey Flynn and JD,

I'm trying to make Custom Read More text for excerpts using PHP but it doesn't seem to be working.

This is what my code looks like:

PHP Code:
<?php if ( !in_category('underground') ) { ?>...<p>Continue reading <a href="%permalink%" rel="nofollow">> %title% <</a></p><?php ?>
I want it to show the continue reading part only if the post is NOT in that category.

The PHP I've added doesn't seem to be affecting anything, the text is still shown no matter what.

Is that how you're supposed to do it? Or does PHP not work for styling the read more (even though it says use HTML and PHP to style).

Thanks,

Adam
  #2  
Old Aug 23, 2010, 03:04 PM
juggledad's Avatar
juggledad
 
20,001 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
Make sure the category name is spelled exactly, case is sensitive. You can also use the ID, but it looks ok the way you have it.
  #3  
Old Aug 23, 2010, 03:46 PM
adum's Avatar
adum
 
85 posts · Jun 2009
The category is ok... I used the same php around a different object in my center column.

No php I use in the Custom Read More seems to be doing anything actually, now that I'm trying more things out.
  #4  
Old Aug 23, 2010, 04:14 PM
juggledad's Avatar
juggledad
 
20,001 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
I'll take a look when I get home in a couple hours
  #5  
Old Aug 23, 2010, 05:40 PM
juggledad's Avatar
juggledad
 
20,001 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
1) you mean ato->Configure EXCERPTS right?? The code works fine there however
2) you can not use it at ATo->"Read More" tag - that can not have php
3) your code has a couple extra <>'s
<?php if ( !in_category('underground') ) { ?>
...<p>Continue reading <a href="%permalink%" rel="nofollow">> %title% <</a></p>
<?php } ?>
make them single
  #6  
Old Aug 23, 2010, 06:21 PM
adum's Avatar
adum
 
85 posts · Jun 2009
Attached is a picture of where I'm typing it and nothing is happening.

Sorry if this is something dumb I'm doing, I can't seem to figure it out. I'm just kinda questioning if PHP works where I think it's supposed to.
Attached Thumbnails
Click image for larger version

Name:	excerpt ato.jpeg
Views:	503
Size:	144.9 KB
ID:	700  

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] custom read more with manual excerpts byronyasgur Excerpts, Read more, Pagination 2 May 6, 2010 05:27 PM
Custom php in a page ccw Atahualpa 3 Wordpress theme 4 Apr 5, 2010 09:42 AM
'Read More' not displaying on custom category-posts-in-a-page maija Excerpts, Read more, Pagination 2 Mar 8, 2010 04:29 PM
[SOLVED] Hide left sidebar on just one custom php page that isn't in the options list marced Sidebars & Widgets 13 Mar 2, 2010 01:35 PM
Add custom php/js menu below header dmtompki Header configuration & styling 6 Jun 23, 2009 10:03 AM


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


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