add text to Event Title in single event
-
I’m trying to add the word “EVENT:” to the title of the single events pages. But not to the event itself, because it’ll show in the full calendar.
Anyone know of a easy way to do this?
-
have you tried settings > formatting > events ?
yeah – but there’s nothing there to edit the header … where the php outputs the Event Title as the <h1>
you can add h1 at settings > formatting > events > Default single event format or try this link http://wordpress.org/support/topic/events-manager-eventslocation-pages-cant-get-sidebar?replies=22
I just tried the link, and it worked – I now have the heading as Event: <event-title-here> … buuuuttt … the event details are not there … now my sidebar is the entire page … ekkk.
my single-event.php looks like this:
<?php get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php
global $post;$EM_Event = em_get_event($post->ID, 'post_id');
?><header class="entry-header">
<h1 class="entry-title">Event: <?php echo $EM_Event->output('#_EVENTNAME'); ?></h1>
</header><div class="entry-content">
<p><?php echo $EM_Event->output('#_EVENTNOTES'); ?></p>
</div></div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>Sorry, the site isn’t live yet, I can’t send the link – I have a coming soon plug in blocking it from being viewed. But if someone want to help me I can disable that plug in for a bit.
try to copy the html elements or template layout of your theme single.php
Funny, I thought about that last night in bed. Sometimes I can be so dense. That’s great. It helped, but my sidebar is now at the bottom … is that a missing div tag you think?
probably something like that, although I’d guess an extra closing div, one too many.
no, that wasn’t the case … well … not that I can see anyway.
<?php
get_header();
?>
<?php
global $post;
$EM_Event = em_get_event($post->ID, 'post_id');
?>
<header class="entry-header"><h1 class="entry-title">Event: <?php echo $EM_Event->output('#_EVENTNAME'); ?></h1></header>
<div class="four columns"><div class="entry-content">
<?php echo $EM_Event->output('<div style="float:right; margin:0px 0px 15px 15px;">#_LOCATIONMAP</div>
<p>
Date/Time:
#_EVENTDATES<i>#_EVENTTIMES</i>
</p>
{has_location}
<p>
Venue:
#_LOCATIONNAME
</p>
{/has_location}
<p>Admission: #_ATT{price}
</p>
<p>
Category
#_CATEGORIES
</p></br></br></br></br></br>
<p>
<h3>< Back to Events Calendar</h3>
</p>
<br style="clear:both" />
#_EVENTNOTES');?>
</div>
</div><div class="sidebar">
<?php if (!dynamic_sidebar('events')) :
endif; ?>
</div>
<?php
get_footer();
?>maybe you can share your theme page.php using pastebin.com so that we can try that out and give you feedback.
I could disbale the coming soon app for a short while … that would help better – right?
if not … the pastebin link to the page that I’m having trouble with is: http://pastebin.com/YC5aUwbH
the page.php code is here:
http://pastebin.com/S5QsmYf7Hope this helps.
can you try this snippet – http://pastebin.com/y1xZgvZV
Sorry, that didn’t work. Thanks for trying though. Would it be helpful if I disabled the Coming soon app and you take a look at the site like that?
I got it working … but it’s not very pretty. And I think it might be bothersome in smaller resolutions and on mobile devices.
I added some messy inline styles<header class=”entry-header” style=”margin:20px 20px 10px 15px;”><h1 class=”entry-title”>Event: <?php echo $EM_Event->output(‘#_EVENTNAME’); ?></h1></header>
<div style=”width: 750px; float: left; margin-left:20px”>
<?php echo $EM_Event->output(‘<div style=”float:right; margin:5px 50px 10px 15px;”>#_LOCATIONMAP</div>Is this a bad idea? I haven’t tested it in other resolutions yet.
- The topic ‘add text to Event Title in single event’ is closed to new replies.