How can I get the Gigpress plugin to display 'artist' name? - Wordpress Solution
[Solved] - How can I get the Gigpress plugin to display 'artist' name? - Wordpress Solution
Try following codes
Hi there, 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: [[LINK href="http://cl.ly/65b3130a3705250915eb"]]http://cl.ly/65b3130a3705250915eb[[/LINK]]) The sidebar-list.php file is what displays the artist's shows in this repeatable format (if they have multiple upcoming shows): [[LINK href="http://cl.ly/313aa82cc97b167a53ff"]]http://cl.ly/313aa82cc97b167a53ff[[/LINK]] 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: [[LINK href="http://cl.ly/f7d90332cc7460051282"]]http://cl.ly/f7d90332cc7460051282[[/LINK]] 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">
	<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>
sidebar-list.php code:
       <div class="row">
			<div class="cell-plus"><a href="#" class="ico-plus">+</a></div>
				<dd><?php echo $showdata['time'] ?>.</dd>
				<dd><?php echo $showdata['price']; ?>$.</dd>
				<dt>Age restrictions:</dt>
				<dd><a class="item-link" href="#"><?php echo $showdata['admittance']; ?></a></dd>
				<dd><?php echo $showdata['address_plain']; ?></dd>
				<dd><br />phone: <?php echo $showdata['ticket_phone']; ?>. <a href="#"><?php echo $showdata['notes']; ?>.</a></dd>

Solution - 1

to ensure that showdata has this name just pastate thsi code into sidebar-list-start.php very posible that you just need to ask this aviable in some other way...

Solution - 2

Hello, use this code ( ID, $key, true); ?> ) instead of .

<?php $key="artist"; echo get_post_meta($post->ID, $key, true); ?>
Waiting for result ;)

Date: 2022-10-21 05:22:25
Category: Wordpress
More for You