Louis Nel

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Using Ionicons in Geodirectory #379626

    Louis Nel
    Expired Member
    Post count: 6

    Dear Paolo

    You are saving me a lot of trouble.

    Thank you very much.


    Louis Nel
    Expired Member
    Post count: 6

    Dear Stiofan

    Thank you for your help. Currently the answer you gave is the option most people would use, but then you still have people giving files unsexy names, and the “pdf” bit at the end does not make it better.

    I have the situation where people have up to four menus. I would have to create upload fields that would say “Download Menu no.1”, “Download menu no.2” because there are just so many types of menus.

    In the attachment four menus are displayed in their own tab on a unrelated directory website, within a tab. The tabs have the menu’s unique name on them. These are html fields which would be fine. Currently I can create html fields, that can be in their own tabs, but they would still have to have generic names on the tabs.

    The suggestion for multiple file uploads here ( https://wpgeodirectory.com/support/topic/multiple-files-into-the-same-custom-field/ ) is a possibility with some work.

    Thank you for your help.


    Louis Nel
    Expired Member
    Post count: 6

    Hi

    Thank you for getting back to me so quickly.

    At the moment when I upload a file called Summer_Menu.pdf under the “File Upload” field, it will display a link called Summer_Menu.pdf . That is ok, but if the file is called 345_Sum20170517.pdf it is a bit messy. Putting the code below into the functions.php , I can get it to display that particular field with html variable “winter_menu”, as “Download the Winter Menu”

    // Replace ‘winter_menu’ in “geodir_show_geodir_winter_menu” with the html variable of your custom field
    add_filter(“geodir_show_geodir_winter_menu”,”myTheme_change_menu_title”, 10,2);
    function myTheme_change_menu_title($html, $variables_array){
    if($parts = explode(‘target=”_blank”>’,$html)){
    $html = $parts[0].’target=”_blank”>Download the Winter Menu</div></div>’;
    }
    return $html;
    }

    Because there are so many types of menus, I cannot create a field for each one, because everybody in the restaurant business has their own menu type. I would like to get the link name to be derived from the pdf file name. That means the pdf file name will have to be properly formatted, but that will just have to be the case.

    If the file is called Bar_Mitzvah.pdf I want the link to be displayed as “Download the Bar Mitzvah Menu”. If the file is called Breakfast.pdf I want the link to be displayed as “Download the Breakfast Menu”.

    Is there a way this can be done?

    Kind regards

    in reply to: Oops! That page can’t be found. #372963

    Louis Nel
    Expired Member
    Post count: 6

    Hi

    Thank you very much, that was exactly the problem.

    Thank you very very much.

    in reply to: Oops! That page can’t be found. #372852

    Louis Nel
    Expired Member
    Post count: 6
    This reply has been marked as private.
    in reply to: Oops! That page can’t be found. #372850

    Louis Nel
    Expired Member
    Post count: 6
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount