• Resolved fatherb

    (@fatherb)


    Hi – can’t get the title that I’m adding in Metadata to appear in OG:title. It currently defaults to the page name which is HOME, which is not what I want to appear. I’ve added metadata in the Title field of ‘Art courses for all’ but Facebook, Twitter ignore it.

    Hope you can help.

    https://wordpress.org/plugins/add-meta-tags/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Oh, almost the same Q I had above. I think we wrote at the same time..

    Plugin Author George Notaras

    (@gnotaras)

    Hi all,

    Currently, this is the default behavior of the plugin. The custom title is only used in the title HTML element, while the actual post title is used in the generated metadata (og:title, twitter:title, dcterms.title, etc).

    I acknowledge that it can be a problem in some cases. Please give me some time to think about possible solutions about this.

    Thanks for your feedback.

    Kind Regards,
    George

    Thread Starter fatherb

    (@fatherb)

    Hi George,

    Thanks for the reply. Ok, for the time being I’ll change the name of the page title and override it in the menu.

    If you could figure out a way to override the title with what you put in the metadata that would be great.

    Thanks for all your work.

    fatherb>> That’s a good temp solution. Thanks.

    Just the problem, one have to change ALL doc titles and then change the menu titles. Not good at all for SEO.

    Plugin Author George Notaras

    (@gnotaras)

    Folks, I do not recommend changing your structures.

    It’d be better to filter the plugin output instead. If you search this forum you will find examples about how to do it.

    My recommendation is to wait for a few days until the feature is implemented. My free time is very limited right now. I’ll be able to work on this or provide more detailed help and sample code on Monday or Tuesday.

    Thanks in advance for your understanding.

    Kind Regards,
    George

    Hi,

    for now I’ve worked around this problem by editing the amt_opengraph.php file like this:

    LINE 275
    $metadata_arr[] = '<meta property="og:title" content="' . esc_attr( amt_process_paged( single_term_title( $prefix = '', $display = false ) ) ) . '" />';

    CHANGED TO:
    $metadata_arr[] = '<meta property="og:title" content="' . esc_attr( amt_process_paged( single_term_title( $prefix = '', $display = false ).' | '.get_bloginfo('name') ) ) . '" />';

    this makes any Cateogory page og:title look like “Category name | Site name”, instead of just “Category name”.

    And this part:

    line 556
    $metadata_arr[] = '<meta property="og:title" content="' . esc_attr( amt_process_paged( get_the_title($post->ID) ) ) . '" />';

    CHANGED TO
    $metadata_arr[] = '<meta property="og:title" content="' . esc_attr( amt_process_paged( get_the_title($post->ID).' | '.get_bloginfo('name') ) ) . '" />';

    This makes all single posts and pages have a “Title | Site Name” in og:title facebook tags. By default the plugin only puts “Title” in fb tags.

    I must make a disclaimer, I’m not really a php coder, I hardly really understand the syntax so maybe there are better ways of doing this, however this worked for my needs, maybe it will help someone until a new version of the plugin is available.

    Plugin Author George Notaras

    (@gnotaras)

    Hi @vtinath,

    I see. The above code seems OK, but it still uses the post’s regular title in the metadata. The needs here are more complicated than I had originally thought.

    There are two features in the works that will provide solutions to all aforementioned requirements. I’ll post more details soon.

    I’d like to apologize for the slow progress, but currently my free time is very limited and both features regarding the title customizations need to be well thought before they are implemented.

    I’ll keep you updated with more details. Although, I now have a clear understanding of all the customization needs, your feedback about how the functionality should be is always welcome.

    Kind Regards,
    George

    Plugin Author George Notaras

    (@gnotaras)

    Hello all,

    Just a small update to let you know I haven’t been able to work on the plugin lately and this is going to be the case for the rest of this week as well.

    My apologies to all about this. I’ll try to make a release containing the requested features (title customization both of the title html element and the titles used in the generated metadata) together with some minor fixes as soon as possible (hopefully within the upcoming weekend).

    George

    Plugin Author George Notaras

    (@gnotaras)

    Hi all,

    I guess it is time for an update.

    If you are still following this topic, I’m sorry for the delay. The custom title appearing in the metadata would be quick and easy to implement. However, due to the fact that the new release will support extensive title customization, your requested feature had to be implemented in accordance to the way the titles are managed in the new release. Hence the delay..

    However, I’m glad to announce that the implementation is almost finished.

    There are two extra options in the plugin settings:

    1. Option to force the use of the content’s custom title, if one has been set, in the generated metadata. (Your requested feature)
    2. Option to let Add-Meta-Tags handle titles according to user-defined title templates for the various parts of the web site.

    The documentation of the new feature, the default title templates and sample code about how to customize each template will appear in the Advanced Title Management page of the Add-Meta-Tags Cookbook.

    Due to the fact that the new release will have some deep changes, I’m planning to release a beta version for testing (more info will follow soon) so as to avoid the possibility of any critical bug sneaking into the final release.

    I’ll post more information (possibly today). Stay tuned!

    Kind Regards,
    George

    Plugin Author George Notaras

    (@gnotaras)

    All features have been implemented. The code works as expected so far, so possibly there will be no pre-release version. I’ll test the code myself for a little while and will make a new release as soon as I’m sure everything is fine. However, if anyone is interested in testing a pre-release version, you are more than welcome.

    George

    Plugin Author George Notaras

    (@gnotaras)

    Version 2.9.2 has been released. It is now possible to force the use of the custom title, if set, in the metadata in addition to the ‘title’ HTML element.

    Please enable the ‘Enforce the use of the content’s custom title in the generated metadata.‘ option in the plugin settings page at Settings->Metadata.

    Kind Regards,
    George

    Plugin Author George Notaras

    (@gnotaras)

    I’m now marking this topic as resolved.

    Thanks a lot for the update!

    Plugin Author George Notaras

    (@gnotaras)

    @ecdltf: Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘My added Metadata for title is not appearing in OG:title’ is closed to new replies.