• Hi there. I am using child of Hueman and have Events Made Easy plugin. I’ve posted this question to the plugin developer and he’s shown me that this is a theme issue.

    When their plugin creates an event, it does so by dynamically changing data on a page (events). However, it was not changing the actual title of the page to the single event.

    When I asked the plug-in developer, this is how they responded:

    I checked the theme: they call the wordpress function “the_title()” outside the loop:

    “hueman calls in page.php the template inc/page-title outside the loop, which calls the_title(), so that can only be the original page title then. This is wrong.

    Compare it with twentyeleven/single.php, which calls the template content-single.php in the loop, which in turn calls the_title() and that works just fine.”

    What is an easy fix for this?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi!

    Does the Events made easy use single post pages or regular pages?

    If on a regular page, try to move this in page.php:

    <?php while ( have_posts() ): the_post(); ?>

    And add it just above:

    <?php get_template_part('inc/page-title'); ?>

    If in single posts, do the same thing but in single.php instead.

    See if that works, if it does I’ll keep it in mind for future updates.

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Hi Alexander,

    It’s in a page.php that it creates, “Events”. This changed my H1 properly, but it is still calling that page’s title “Events” for the <title> tag. Any idea on how to get this to be dynamically filled by the single event content that’s filling that page?

    If it helps, the site is https://www.pathsatlanta.org and the single event page I am testing/working on for this is:
    https://www.pathsatlanta.org/events/36/northern-shaolim-plum-flower-fist-workshop/

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Hi Alex,

    Please see This Thread regarding this issue.

    I have yet to figure out how to get this to work…

    Hi Craig. On your test page, the page title matches the post title. Isn’t that what you were trying to fix?

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    No….I am looking to change the <title> tag – the title that shows up on the top of your browser, in search results, tab title, bookmarks etc.

    You can see that yes, in two places within the textual content of the page, it says “Northern Shaolin Plum Flower Fist Workshop”. However for the actual <title> tag of the page, it says “A Test Page”. I need that to also say “Northern Shaolin Plum Flower Fist Workshop”. Just on this example – it is obviously dynamic. I do not need to hard-code that one piece of text in….

    Did you try the suggestion made my Alex above?

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Yes…I changed it way back when he suggested it . Page.php now starts with:

    <section class="content">
    	<?php while ( have_posts() ): the_post(); ?>
    	<?php get_template_part('inc/page-title'); ?>
    
    	<div class="pad group">

    However that piece of code, which calls in inc/page-title, starts off like this:

    <div class="page-title pad group">
    
    	<?php if ( is_home() ) : ?>
    		<h2 class="entry-title"><?php echo alx_blog_title(); ?></

    None of that deals with the title tag. ??

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    The title tag is this bit, found in header.php

    <title><?php wp_title(''); ?></title>

    We’re talking about Hueman theme + Events made easy plugin. I have talked to the EME plugin creator and linked to that thread. They are basically saying it has to do with the theme. So I came here and posted that question a year or so ago.

    Each reply I get, keeps telling me how to adjust the <h2>Page Title</h2>. This is not what I am looking for. I am looking to adjust the <title>Page Title</title> to the single event.

    A few lines down from that in page.php is this:

    <?php elseif ( is_page() ): ?>
    	<h2><?php echo alx_page_title(); ?></h2>

    Here’s the function:

    function alx_page_title() {
    	global $post;
    
    	$heading = get_post_meta($post->ID,'_heading',true);
    	$subheading = get_post_meta($post->ID,'_subheading',true);
    	$title = $heading?$heading:the_title();
    	if($subheading) {
    		$title = $title.' <span>'.$subheading.'</span>';
    	}
    
    	return $title;
    }
    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Perhaps I am completely missing something here, but can you show me where in that code it is referencing the <title> tag?

    In all of that code, we see Heading and SubHeading, all called within a <h2>.

    It’s not the <title> tag… ??

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Please help explain bdbrown. I appreciate your help but I am just not understanding.

    OK, so maybe we’re off track due to semantics. The original post asked about the “title of the page”. The plugin developer said it was a theme problem because the theme was calling “the_title()” outside the loop. Well, maybe yes, maybe no, depending on what type of post/page is being displayed. Not worth debating at this point. Based on what the plugin author said Alex offered a solution. But it apparently didn’t fix the real problem, which isn’t the page title displayed in the content area (which is what the plugin developer was referring to), but the site/page title displayed in the browser tab, etc. That title is created using the WP function wp_title(). The code you posted above from header.php is from an older version of the theme. That was replaced in version 1.4.8 (wp.org repository) and v2.2.1 (theme website) by adding code in functions.php to implement theme support for the default WP title tag:

    function alx_setup() {
    	// Enable title tag
    	add_theme_support( 'title-tag' );

    WP is standardizing the way themes create the title. This is the announcement of the change in WP and the anticipated benefits. Plugin developers are discouraged, at least for now, from trying to use the newly-implemented title functionality. That doesn’t mean that it can’t be done now. But you’d have to write a custom function, and call it at the right time, to make it work. That’s a bit beyond what I can do here.
    So, that’s my take on it. Hope you find all this helpful.

    Thread Starter Craig S. Kiessling

    (@iamnorthwind)

    Hi bdbrown!

    Thanks so much for taking the time and having the patience to craft a well thought out reply!

    I apologize for my delay in reply, as I completely forgot about some themes needing to be updated manually. I wasn’t even aware that the theme needed to be upgraded. Thanks for the reminder. I took the time to upgrade the parent theme and fix what little issues needed with that – thus the delay.

    Yes, we’re on the same page now (see what I did there? :P).

    But I see what you’re saying. I’m guessing this simply will not work for now. On the EME forums, I clicked on any link that a user put up – to show their url/site as reference, when talking about an issue…And in none of them did I see the functionality of what I am talking about.

    It seems common sense to me: If you’re on a page with a list of Events – that title should be “Events” or some derivative thereof.
    If on a page only about a specific page – that title should be “Title of Event” or something.

    Not having this negatively affects usability (bookmarks, etc.) and SEO (SERP title-link display).

    Yeah, nice pun…;-) So, I don’t know how invested you are in EME, but I’m using the The Events Calendar plugin with its default page template. On the event summary page, the browser tab shows “Upcoming Events”, which is the title on the page. On the individual event pages the tab shows the name of the event which is also the page title. Sounds like that’s what you’re after?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Events Made Easy’ is closed to new replies.