Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1071312

    Hi,

    A client for whom I have to make a new website wants a text in the top bar which they can easily change themselves whenever and how often they want. Like the option phone-info, however this should be possible without giving them access to Enfold theme options.

    Is this possible and how can I achieve this?

    Thanks & regards,
    Monique

    #1071341

    You could use file_get_contents to open and read in an external file line by line and pass that to a string, then write that string into a custom div at the top of the website.

    #1071915

    Thanks for your reply @DigitalEssence.

    Unfortunately I am not a PHP programmer and I don’t understand how I can get this to work. It looks too complicated for me. When I try to understand a little bit what this is about, I get the impression that there should be a PHP file somewhere (functions.php?) in which my client can make changes to change the ‘hero’ text on their site. Normally such a file should be uploaded by ftp. My client doesn’t have these options available. There should be something in WordPress (outside the theme options) where they can change this text as often as they want.

    #1071916

    Hi,

    functions.php doesn’t exist by default, you have to create it in your child theme. You could either use and a hook that or copy header.php over from Enfold to your child and make your changes in there as this is the file that writes the header and the initial HTMl content where you would be placing a top bar..

    But, if the client doesn’t have access to FTP and can’t upload a file then I think the only option would be to see if a plugin does what you need.

    https://wordpress.org/plugins/tags/dynamic-content/

    #1072490

    Hi Monique,

    Maybe you could try adding a widget area to the header? https://kriesi.at/documentation/enfold/header/#adding-a-header-widget-area

    Thanks @DigitalEssence for helping out :-)

    Best regards,
    Rikard

    #1072555

    Hi Rikard,

    Thanks for your reply.

    This site is already going to have an extra widget area for another purpose. It won’t be possible to add the ‘hero’ text there as well. Further my client wants the hero text in the left top bar.

    Any more ideas?

    Best regards,
    Monique

    #1073545

    Hi Monique,

    You can add more than one widget to the header, just select a different name for your widgets. Then you can style them differently as well in order to display them in different locations.

    Best regards,
    Rikard

    #1074472

    Hi Rikard,

    Hmmm… I expect in that way the ‘hero’ text will be in the header and not in the top bar?If that is the case, the left top bar will be empty and the header will be overcrowded… Of course you can style anything, with negative top margins and so, but it is a lot of hassle and most probably you will not get a good result on all different devices…

    Just an idea: is there perhaps a way to retrieve the general WordPress subtitle of the site (which is in WordPress General Settings) and to place this in the top bar? In that way my client will be able to change their text whenever they wish.

    Or a notification bar or something alike?

    Best regards,
    Monique

    • This reply was modified 5 years, 9 months ago by Monique. Reason: new suggestion added
    #1075949

    Hi,

    Yes, that is possible. Create a custom shortcode base on the get_bloginfo function and then put that shortcode inside a text widget.

    // https://developer.wordpress.org/reference/functions/get_bloginfo/
    // https://codex.wordpress.org/Function_Reference/add_shortcode

    The code may look something like this:

    add_shortcode( 'av_description_shortcode', 'av_description_shortcode_callback' );
    function av_description_shortcode_callback() {
        $description = get_bloginfo('description');
        return $description;
    }
    

    Best regards,
    Ismael

    #1100710

    Hi there,

    We’ve found a work around to place the ‘hero’ text in the extra header widget of the site.

    Please can you close this topic?

    Thanks for your help & best regards,
    Monique

    #1100872

    Hi Monique,

    Thanks for the update, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Top bar phone-info easy changeable by client’ is closed to new replies.