Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] Very simple: Conditional "|" Separator

Old Apr 6, 2010, 01:17 PM
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.
Old Apr 6, 2010, 02:23 PM
juggledad's Avatar
23,682 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
Old Apr 6, 2010, 02:55 PM
4 posts · Apr 2010
Worked like a charm. Thank you!


footer links, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:33 AM.

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