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 » Sidebars & Widgets »

Adding php code above central column


  #1  
Old Apr 28, 2011, 09:55 AM
qbuster's Avatar
qbuster
 
84 posts · Mar 2010
Alrewas, Staffordshire, UK
My site http://waterwaypetition.com has a posts page in the central position srounded by left and right columns.

What I want to is insert some php code.....

Code:
<?php echo '<center><h2>Remember to <a href="http://waterwaypetition.com/?p=7"> click here </a>to show your support.</h2></center>'; ?>
...that appears on the top of each post/multiple post page but not the page targeted in the url (p=7)

I've got this working partially via ATO using Style & Edits Center Column, Content Below the Loop but showing below the bottom post is not that obvious.

I've also tried the following variation in Content ABOVE the Loop....

<
Code:
?php if ( $bfa_ata['postcount'] > 0 )
 { echo '<center><h2>Remember to <a href="http://waterwaypetition.com/?p=7"> click here </a>to show your support.</h2></center>'; }?>
...but something is wrong with the $bta_ata[] variable I am using because I don't get any results. Any suggestions?

Thanks


Will
  #2  
Old Apr 28, 2011, 10:42 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
Try putting the following at the bottom of Content Above the Loop
HTML Code:
<?php if( ! is_page('7') ) echo '<center><h2>Remember to <a href="http://waterwaypetition.com/?p=7"> click here </a>to show your support.</h2></center>'; ?>
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Apr 28, 2011, 10:58 AM
qbuster's Avatar
qbuster
 
84 posts · Mar 2010
Alrewas, Staffordshire, UK
Quote:
Originally Posted by lmilesw
Try putting the following at the bottom of Content Above the Loop
HTML Code:
<?php if( ! is_page('7') ) echo '<center><h2>Remember to <a href="http://waterwaypetition.com/?p=7"> click here </a>to show your support.</h2></center>'; ?>
Thanks for that - I knew there would be a way to ask the question.........am I correct in assuming that is_page() is a WP function rather than BFA?


Cheers


Will
  #4  
Old Apr 28, 2011, 01:15 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
yes, it is a wordpress function - there are lots of conditional tests, just check out
http://codex.wordpress.org/Conditional_Tags
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Apr 28, 2011, 02:15 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
And the ! means NOT so in this case if it is not that page then show the text.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] After update, images in new posts no longer resize with central column width est1984 New Versions, & Updating 5 Dec 31, 2010 09:27 PM
On setting up headers - the central column is push up Ponics Header configuration & styling 3 Jul 28, 2010 03:20 PM
issue: blank Central Panel - PHP code options stored with an \ ssokolenko New Versions, & Updating 3 Sep 15, 2009 05:29 PM
[SOLVED] central column error vsamigo Page & Category Menu Bars 10 Jul 15, 2009 12:21 PM


All times are GMT -6. The time now is 10:34 PM.


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