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] Weird behaviour from Custom read more.


 
Prev Previous Post   Next Post Next
  #1  
Old Apr 14, 2011, 01:26 PM
Marco.s
 
10 posts · Feb 2011
[SOLVED] Weird behaviour from Custom read more.

Hi,
found a really weird issue related to the custom read more content and User roles.

Site is bilingual using qTranslate and I needed 2 separated "continue reading" lines...
Using the exec-php plugin (and thanks to another post in this forum section) I was able to set this:
PHP Code:
<?php if ( function_exists('qtrans_getLanguage') && qtrans_getLanguage()=="it") { ?>
<p>Leggi il resto di <a href="%permalink%"> %title% </a> per <a href="%permalink%#Altre%20Foto" rel="nofollow">altre foto</a> e <a href="%permalink%#Pedigree" rel="nofollow">Pedigree</a></p>
<?php } else { ?>
<p>Continue reading <a href="%permalink%"> %title% </a> for <a href="%permalink%#More%20Photos" rel="nofollow">more photos</a> and <a href="%permalink%#Pedigree" rel="nofollow">Pedigree</a></p>
<?php ?>
The code seemed to work randomly: some posts had the proper line, others showed both without any apparent logic.

Finally I realized the only posts showing the proper line where the ones written by administrative roles, while the other user's , with editor role, didn't execute the php IF.

I'm not sure if this is an issue related to Atahualpa or exec-php .
Anyway, since I can't assign the admin role to my editor (she's quite unexperienced and might f*** up the whole site in no time), is there an alternative, hardcoded way to add my custom read more?

Gave it a quick look, and seems bfa_post_parts.php is the file to work on.
Where should I insert the code, in that case? would shortcodes work?

edit: well, either hardcode my IF statement in the bfa_post_parts.php or place it in post_footer_multi so that it could execute php...

Last edited by Marco.s; Apr 14, 2011 at 04:15 PM.
 

Bookmarks

Tags
custom read more, exec-php, qtranslate

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Header Image Behaviour micaela Header configuration & styling 2 Feb 14, 2011 10:06 PM
Custom Read More with PHP adum Excerpts, Read more, Pagination 14 Sep 20, 2010 06:25 AM
Don't show "Custom Read More" for manually created excerpts? adum Excerpts, Read more, Pagination 4 Sep 13, 2010 09:50 PM
[SOLVED] custom read more with manual excerpts byronyasgur Excerpts, Read more, Pagination 2 May 6, 2010 05:27 PM
'Read More' not displaying on custom category-posts-in-a-page maija Excerpts, Read more, Pagination 2 Mar 8, 2010 04:29 PM


All times are GMT -6. The time now is 05:31 AM.


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