Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   custom fields with hot link (http://forum.bytesforall.com/showthread.php?t=7434)

alfie Jun 4, 2010 01:58 PM

custom fields with hot link
 
I am trying to access a custom field which consists of a url address. www.name.com

I wish to use this as a hot link to the website. I first tried it without the hot link and it worked. code shown below.

<?php if (is_category()) {
$customfield = get_post_custom_values("Author");
if (isset ($customfield[0])) {
echo "Author: ". $customfield[0] ;
$customfield = get_post_custom_values("WebSite");
echo "WebSite: ". $customfield[0] ; }
} ?>

I then tried to change it to become a hot link substituting the line below .


echo "WebSite: ". '<a href= "$customfield[0]">website name</a>' ; }

all that showed up was the website name?


I included this in index.php

just before bfa_center_content(....)

lmilesw Jun 4, 2010 05:58 PM

Hi again Alfie... I just want to reiterate that making all the changes it appears you are making to the theme code will make an upgrade of the theme cumbersome. Isn't there some way to do what you want without touching the theme files?

alfie Jun 7, 2010 11:45 AM

Hi There ... I feel like I'm meeting up again with an old friend but is your first name miles or larry.

I'm slightly confused. How can I do what I want without adding code to the existing files, in this case index.php.
There is apparently something i do not understand. Let me take the opportunity to clarify my objective. I am trying to place a line for Author: ------and a line for WebSite: ------
somewhere within a post. The author name and web site url are placed in custom fields. In this case it seems like I can only do this by placing it above the title on the category page (excerpts) by placing the custom fields code in index.php.

Is there another way to do this by using Wordpress or Atahaualpa options - I don't think so. Can you give me some words of wisdom.

Alfie

lmilesw Jun 7, 2010 01:20 PM

My name is Larry Alfie. I think what you want to do is built into Atahualpa which is why I like this theme so much. When you said you wanted a link to a website in the post I thought this might require some coding but I looked in the Theme Options under Edit POST/PAGE INFO ITEMS and there is a ton of code you can place in various spots. What I did was put
HTML Code:

By %author-link%, on %date('F jS, Y')% %author-url%
in any or all of the Byline boxes. This gives me output like here on my current test site. The %author-link% links my name to my website as well.

alfie Jun 7, 2010 03:06 PM

Larry

Thanks loads for pointing that out. I just didn't realize the versatility of the ATO. I realize now that there is a preference by the developers for feedback on something that is not included in the ATO so that it can be updated if desired - such as the marquee application we were discussing previously. I've always said that complexity is the sum of simple things - still we must first understand those simple precepts.

check our dialogue on the marquee. I tried it on another computer and it worked on browsers Firefox and Explorer except that the bar menu remained with the cat scrolling marquee. It was not clickable.

Alfie

lmilesw Jun 7, 2010 06:28 PM

The marquee effect appears to be "iffy" depending on the browser you are using. For that reason alone I would shy away from its use and look to other solutions. If you could give me an idea or example of what you are trying to do maybe I could suggest some alternative solutions.

alfie Jun 8, 2010 03:01 PM

Larry

My problem is that the user may also be a contributor and may choose to recommend categories. AS a result ove time the bar menu solution tends to grow. I already reduced the number of categories myself and will attempt to assign new posts to existing categories.

New thought provoking and innovative categories are part of what makes the web site very different. That is why the marquee seems like a good fit. In addition I have a sidebar drop down list for all categories as a backup.

lmilesw Jun 8, 2010 08:28 PM

I think I mentioned this before but what you are describing is more like tags. You could use tag cloud which is what that is made for.


All times are GMT -6. The time now is 08:31 PM.

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