-
AuthorPosts
-
May 12, 2015 at 11:56 am #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
May 13, 2015 at 6:21 am #443542Hey 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,
RikardMay 13, 2015 at 12:03 pm #443691Hey 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!
May 14, 2015 at 8:12 am #444117Hey!
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,
RikardMay 15, 2015 at 11:16 am #444877I don’t use a plugin. I thought of WordPres on board custom fields https://codex.wordpress.org/Using_Custom_Fields.
May 18, 2015 at 5:10 am #445498Hey!
Ok I see, what code are you using to display your custom field?
Best regards,
RikardMay 18, 2015 at 4:31 pm #445792Hi,
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,
DanielMay 19, 2015 at 10:57 am #446321 -
AuthorPosts
- You must be logged in to reply to this topic.