Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #442946

    Hi,

    I want to replace the h1 title in the grey title bar with the text of a custom field (should be a slogan or motto). I already suceeded in making it from a <h1> to a <div> and delete the link via the functions-enfold.php in a child theme. But I didn’ get it done to load the content of a custom field.

    Thanks

    Daniel

    #443542

    Hey marximo.lider!

    I’m not sure what you are trying to do, are you trying to load content into your custom div from a custom field (using plugin?) to load something from the backend?

    Best regards,
    Rikard

    #443691

    Hey Rikard,

    by default the grey title bar can show title as H1 & breadcrumb, one of both or none. But I want to display a custom slogan (inside a div) & the breadcrumb in this bar. The H1 would be in the content area and is created in the WP Editor / Layout editor.

    I thought I can define a custom field (e.g. named “motto”) in the backend and load the value of this field (e.g. “Wie wird Ihre Lösung aussehen?”) of this field in the title bar instead of the entry’s title. I’ve already managed to change the title-bar <h1> to a <div>, so that there are on the first hand not two H1s on one site, and on the second hand since the “motto” does not describe the content of the page.

    Currently I could change the entry’s title in the backend to get the result – but that would bedazzle the customer’s editor(s).

    Thanks!

    #444117

    Hey!

    Ok, support for third party plugins is out of scope but maybe we can help you any way. What plugin are you using and have you read the documentation on how to display values set in the backend?

    Best regards,
    Rikard

    #444877

    I don’t use a plugin. I thought of WordPres on board custom fields https://codex.wordpress.org/Using_Custom_Fields.

    #445498

    Hey!

    Ok I see, what code are you using to display your custom field?

    Best regards,
    Rikard

    #445792

    Hi,

    thanks, already figured it out. Works by replacing “get_the_title($id),” in line 310 of child’s functions-enfold.php with “get_post_meta ($id, ‘motto_title’, true),”

    But I don’t know, if that’s the very clean solution…

    best,
    Daniel

    #446321

    Hey!

    Great, glad you got it fixed. I wouldn’t worry too much about it being clean, if it works it works :)

    Cheers!
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.