Home › Forums › Calendar Products › Events Calendar PRO › Call the title
- This topic has 9 replies, 3 voices, and was last updated 8 years, 9 months ago by Support Droid.
-
AuthorPosts
-
January 28, 2015 at 5:04 pm #938688HunterModerator
I’m trying to call the title as a link title (” href=”…”> on my single-event.php. When I use <?php echo get_the_title(); ?>, it shows the code rather than the event title.
What else can I do to achieve this task?
January 29, 2015 at 4:39 am #938750Gustavo BordoniKeymasterHi Hunter Wilson,
Thanks for coming here to the forums, I want to help you on your issue, but to do so I will need to see the full code of your <b>single-event.php</b>.
Other than that the default HTML for a link with the post title would be:
<a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a>
My Best regards,
January 29, 2015 at 12:02 pm #938864HunterModeratorI tried what you provided and still got the code showing rather than the current event page title. The code I originally posted turned into a link, but it looks like this:
< a href=”‘ . get_field(‘instagram’) . ‘” target=”_blank” >
January 29, 2015 at 12:48 pm #938890Gustavo BordoniKeymasterHi Hunter, the code you provided should be as the following:
<?php echo '<a href="' . get_field( 'instagram' ) . '" target="_blank">' . get_the_title() . '</a>'; ?>
Check if the code above resolves your issue, if not I will help you faster if you provide me the full file, via http://codebin.org/
My Best Regards,
January 29, 2015 at 12:52 pm #938891HunterModeratorI got an error when I tried that. Here is my paste bin code for a link: http://codebin.org/view/18b7694f
January 29, 2015 at 1:00 pm #938896Gustavo BordoniKeymasterCan you send me which error happened?
Thanks,
January 29, 2015 at 1:33 pm #938900HunterModeratorI think I had some incorrect syntax, but no matter what I try I can’t get it to display the title. Can you provide me the revised snippet of my code you recommend I try and share it via pastebin?
January 29, 2015 at 1:34 pm #938901HunterModeratorI’m fairly familiar with PHP and my events used to be able to call the title all over my event pages, but I’m not sure what caused this to change.
February 1, 2015 at 4:09 pm #939310Gustavo BordoniKeymasterHi Hunter,
There you go: http://pastebin.com/N6qYmWjV
If there is any problems again, please send me the error so I can help you debug whats happening.
My Best Regards,
July 7, 2015 at 6:31 am #983705Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Call the title’ is closed to new replies.