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:
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 |
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.
|
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. |
I'll take a look when I get home in a couple hours
|
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 |
1 Attachment(s)
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. |
that's where I put a copy of your code (I changed the category to one of my own) and it worked fine. Try changing the '!in_category' to just 'in_category' and see if you get different results
p.s. if you have any caching plugins, make sure to disable them and clean out the cache... |
I guess it's something weird I've got going on. :/
I'm trying things like is_page() which should make the excerpt not show up at all, yet it's still there. I tried 2 PHP strings with one saying !in_category('x') and the other in_category('x') but it just shows the Read More text twice. Nothing I'm doing is affecting it. I made sure to disable my cacheing plugin, I guess I'll start disabling other plugins 1 by 1 to see if I can find the issue. Sorry for all the trouble. I'm using Atahualpa 3.5.3 if that makes any difference. I am using get the image and edited this portion of post parts but I don't think this should have messed anything up: Code:
function bfa_post_bodycopy($before = '<div class="post-bodycopy clearfix">', $after = '</div>') { |
I'm dumbfounded...
I'm using version 3.5.3, turned off all my plugins, trying this code in the custom read more: PHP Code:
The php just doesn't seem to do anything... is there an option I need to enable somewhere in Atahualpa to make it work? I don't think I've done any major editing of the Atahualpa templates either, so this really confuses me. Anyone besides Juggledad getting this to work? |
Did you upload the original file?
|
1 Attachment(s)
Just uploaded a clean version of 3.5.3, no plugins, still no change.
Could what I use in my center column be affecting it? That's like the last thing I can think of that would mess it up. Attached is a file of my center column. Thanks for the help and I just sent a donation your way. -Adam |
working for me with both your center area and the new excerpt code. If you want me to take a look, send me a PM with an admin ID/PW
|
PM sent .........
|
I just did a fresh install of WordPress and Atahualpa 3.5.3 on a domain and the php in the read more still doesn't do anything.
I think this is some kind of issue with Atahualpa. |
Arugh...I figured it out
PHP in the 'Custom read more' is not supported by Atahualpa. the reason it was working for me and not you is I had the plugin 'exec-php' installed and active. This plugin was processing the PHP in 'Custom read more'. I just added the plugin to your site and it is now working the way you want. Sorry this took so long to figure out. |
All times are GMT -6. The time now is 08:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.