mnybud Posted April 1, 2012 Share Posted April 1, 2012 Trying to figure this out... <?php echo get_the_title(); ?> works to display my wordpress post title on the page. how can I echo that inside this code? <?php if (function_exists('simple_feed_list')) : ?> <?php simple_feed_list('I WANT TO ECHO TITLE HERE'); ?> <?php endif; ?> Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/ Share on other sites More sharing options...
Muddy_Funster Posted April 1, 2012 Share Posted April 1, 2012 I don't know why you are constantly closing and opening your php tags. simple_feed_list(get_the_title()); ?> Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/#findComment-1333320 Share on other sites More sharing options...
mnybud Posted April 1, 2012 Author Share Posted April 1, 2012 well obviously I suck at PHP, which would be why Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/#findComment-1333327 Share on other sites More sharing options...
Muddy_Funster Posted April 2, 2012 Share Posted April 2, 2012 well obviously I suck at PHP, which would be why Not a fair assumption to make, you could be copying and pasting segments of code from within a larger file that has, in it's original format more contnent that is not within the php tags. I like to start by giving people the benefit of the doubt Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/#findComment-1333484 Share on other sites More sharing options...
Adam Posted April 2, 2012 Share Posted April 2, 2012 You need to provide much more context of the code for us to help you. My guess would be that you're not using it with a post defined in the current scope, as I believe WordPress just use the horrific global keyword to get the data into the function. Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/#findComment-1333486 Share on other sites More sharing options...
Jessica Posted April 2, 2012 Share Posted April 2, 2012 Did Muddy_Funster's code work? It seems fairly simple but you did not respond as to whether or not that did the trick? Quote Link to comment https://forums.phpfreaks.com/topic/260143-echo-title/#findComment-1333645 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.