Simple PHP question - merging two codes

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Simple PHP question - merging two codes

Post by egami » Tue Nov 06, 2012 1:48 pm

where's the include for the functions you have created? Seems to me, without that, you're S.O.L.

us2rn4m2
New php-forum User
New php-forum User
Posts: 17
Joined: Thu Aug 09, 2012 1:28 pm

Re: Simple PHP question - merging two codes

Post by us2rn4m2 » Tue Nov 06, 2012 1:49 pm

Code: Select all

<?php 
if ($format == 'gallery') : ?>
	<div id="spotlightg">
		Contributer Spotlight
	</div>
	<div id="gcontent">
		<header class="entry-header"> 
			<?php do_action( 'gpp_before_title' ); ?>
			<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'gpp' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
			<?php do_action( 'gpp_after_title' ); ?>
		</header>
	</div>
	<br /><br /><br /> 
<?php else : echo ''; endif; ?>
Last edited by us2rn4m2 on Sun Nov 11, 2012 9:20 am, edited 4 times in total.

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Simple PHP question - merging two codes

Post by egami » Tue Nov 06, 2012 2:03 pm

Negative Houston...



The functions you have are not defined in your PHP, they are only 'called'.
without the definition of the function, you're not going to get it to work, ever.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 6 guests