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 » Header configuration & styling »

[SOLVED] Very simple: Conditional "|" Separator


  #1  
Old Apr 6, 2010, 01:17 PM
scott.crooks
 
4 posts · Apr 2010
I have a very simple question. In the footer of my page, I am using the %admin% variable to display the link to the WP admin dashboard. I have other links beside the Site Admin that are each separated by a " | ". However, when I'm not logged in, the Site Admin link disappears (as it should) but there still remains a " | " next to one of the links and it looks goofy.

I've attempted to solve this problem by using a super simple PHP script shown below.

PHP Code:
<?php if ($admin_link !== null) {echo " | ";} ?>
However, this does not work. I've attempted other tests like "!== 0" or "isset($admin_link)" but those do not work either. I am confused on the structure of this variable $admin_link it seems. What should I be using?

For the record, I am running WordPress 2.9.2 and Atahualpa theme 3.4.6.
  #2  
Old Apr 6, 2010, 02:23 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
try using 'is_user_logged_in()' ie
HTML Code:
<?php if (is_user_logged_in()) {echo " | ";} ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Apr 6, 2010, 02:55 PM
scott.crooks
 
4 posts · Apr 2010
Worked like a charm. Thank you!

Bookmarks

Tags
footer links, php



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to post on 2 seperate "Pages" or "Cats" TPR Atahualpa 3 Wordpress theme 18 Aug 4, 2010 09:24 PM
How to select "Only Exerpts"/"Full Posts" for certain post? shus Center area post/pages 4 Jan 19, 2010 02:41 PM
How to change the font of "1 comment to..." and "Leave a Reply" headers RHCdG Header configuration & styling 1 Nov 28, 2009 05:56 AM
Background color "sub-pages" and "whole menu bar" gxxfy Page & Category Menu Bars 1 Nov 24, 2009 03:46 AM


All times are GMT -6. The time now is 11:40 AM.


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