Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$20
How can I get the Gigpress plugin to display 'artist' name?
This sounds like a Gigpress-specific question, but actually may be a general php question (I'm new to both.)
Anyway, Gigpress calls the artist's name with this code:
<?php echo $showdata['artist']; ?>There are several php files that make gigpress work. (All of these in fact:
http://cl.ly/65b3130a3705250915eb)
The sidebar-list.php file is what displays the artist's shows in this repeatable format (if they have multiple upcoming shows): http://cl.ly/313aa82cc97b167a53ff
The sidebar-list-start.php file displays the artist's name and the header which reads "EVENTS" and precedes sidebar-list.php.
My question is this: When I have this code:
<?php echo $showdata['artist']; ?> in sidebar-list.php, it successfully pulls the artist's name. However, then it also repeats the artist's name (if there is more than 1 show) which is a problem. But when I put the exact same code into sidebar-list-start.php (which doesn't repeat) it no longer works. Why? and how can I fix this?So really that
<?php echo $showdata['artist']; ?> needs to go into sidebar-list-start.php. However, when I paste that same code (this code: <?php echo $showdata['artist']; ?>) into sidebar-list-start.php, it fails to call the artist's name. There are two other dynamic things in this file as well- the code to call the url to the rss feed and the ical button. Those things both work in the environment of the sidebar-list.php file, but not in the environment of the sidebar-list-start.php file.Does that make sense? I am pasting the full code for each of these php files down below. Why would the php code work in one file and not the other?
Thanks
Kelli
So this is the current code and this is what it looks like: http://cl.ly/f7d90332cc7460051282
Where it says "Artist Name" it should actually be calling the artist's name, but isn't.
sidebar-list-start.php code:
<div class="content-block">
<h3>events</h3>
<div class="heading-link-box">
<h2><?php echo $showdata['artist']; ?>Artist Name</h2></div>
<div class="heading-link-box">
<div class="shows-table">
<div class="thead">
<div class="cell-date">DATE</div>
<div class="cell-city">CITY</div>
<div class="cell-venue">VENUE</div>
<div class="cell-contry">COUNTRY</div>
<div class="cell-icons">
<ul class="add-ico">
<li><a href="<?php echo get_option('home') ?>/?feed=gigpress&artist=<?php echo $showdata['artist_id']; ?>" class="ico-rss">rss</a></li>
<li><a href="<?php echo get_option('home') ?>/?feed=gigpress-ical&artist=<?php echo $showdata['artist_id']; ?>" class="calendar">calendar</a></li>
</div>
</ul>
</div>sidebar-list.php code:
<div class="row">
<div class="cell-plus"><a href="#" class="ico-plus">+</a></div>
<dl>
<dt>Time:</dt>
<dd><?php echo $showdata['time'] ?>.</dd>
<dt>Admission:</dt>
<dd><?php echo $showdata['price']; ?>$.</dd>
<dt>Age restrictions:</dt>
<dd><a class="item-link" href="#"><?php echo $showdata['admittance']; ?></a></dd>
<dt>Address:</dt>
<dd><?php echo $showdata['address_plain']; ?></dd>
<dd><br />phone: <?php echo $showdata['ticket_phone']; ?>. <a href="#"><?php echo $showdata['notes']; ?>.</a></dd>
</dl>
<div><p></p></div>
</div>
This question has been answered.
Kelli Anderson | 05/25/10 at 4:34pm
Edit
(2) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-
Last edited:
05/25/10
6:01pmOleg Butuzov says:to ensure that showdata has this name just pastate thsi code into sidebar-list-start.php
<?php var_dump($showdata); ?>
very posible that you just need to ask this aviable in some other way...- 05/25/10 4:54pm
Kelli Anderson says:Hi Oleg,
That didn't work. maybe I'm not pasting it in the right place. This is what the page looks like now- I just get a "NULL": http://cl.ly/657266fc10311623841b
Here is what the code looks like so you can see where I pasted it:
<?php var_dump($showdata); ?>
<div class="content-block">
<h3>events</h3>
<div class="heading-link-box">
<h2><?php echo $showdata['artist']; ?>Artist Name</h2></div>
<div class="heading-link-box">
<div class="shows-table">
<div class="thead">
<div class="cell-date">DATE</div>
<div class="cell-city">CITY</div>
<div class="cell-venue">VENUE</div>
<div class="cell-contry">COUNTRY</div>
<div class="cell-icons">
<ul class="add-ico">
<li><a href="<?php echo get_option('home') ?>/?feed=gigpress&artist=<?php echo $showdata['artist_id']; ?>" class="ico-rss">rss</a></li>
<li><a href="<?php echo get_option('home') ?>/?feed=gigpress-ical&artist=<?php echo $showdata['artist_id']; ?>" class="calendar">calendar</a></li>
</div>
</ul>
</div>
- 05/25/10 4:54pm
-

Last edited:
05/25/10
5:25pmRashad Aliyev says:Hello,
use this code ( <?php $key="artist"; echo get_post_meta($post->ID, $key, true); ?> ) instead of <?php echo $showdata['artist']; ?>.
<?php $key="artist"; echo get_post_meta($post->ID, $key, true); ?>
Waiting for result ;)
This question has expired.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
