jahusdtc

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 162 total)
  • Author
    Posts
  • in reply to: Show Custom Field only if in Search Filter #423646

    jahusdtc
    Expired Member
    Post count: 162

    Appreciate that, Alex!

    in reply to: Categories and Subcategories Counts #423425

    jahusdtc
    Expired Member
    Post count: 162

    Ah, I sorta understand. If on Search, I search for “Bob” — how in the world would you know what Subcategories should show? Could be all of them!

    My challenge will be to figure out if ONLY a single Category is chosen and show the widget only then. For another day (maybe tomorrow!)

    Thank you guys for answering me so quickly! Appreciate your knowledge!

    in reply to: Categories and Subcategories Counts #423284

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    in reply to: Categories and Subcategories Counts #423280

    jahusdtc
    Expired Member
    Post count: 162

    Okay, I’m definitely doing something wrong, but am trying to correct it.

    For instance, I have churches. And yes, they were imported wrong, with the default category being something like Baptist, when it SHOULD have been a default category of Churches and a SUB-category of Baptist.

    Sorry…inherited this project.

    To test what I need to do, I went into ONE church: First Baptist Coconut Creek.
    I changed its first category to Churches.
    Under that I chose its SUB-category of Churches-Baptist-Independent.

    Under Detail, all is splendid and those two designators properly show.

    However…problem arises when I search for Category Churches on front page.

    When I click the little search button, I go to Search page (okay, this is GOOD!)

    But on that page, I have put a GD>Category widget in Appearance>Widget.

    It is showing ALL categories, not just Category Churches and Sub-Category of those churches.
    (There are only 7 churches…one is the First Baptist Coconut Creek, which I THINK is in properly. So at least ITS Sub-Category should be showing? Or maybe ALL Churches subcategories should show?)

    I am getting A-Z…Attorneys, Plumbing, etc. Thought I had this working before, but goofed something up.

    My widget image is attached. (Image 1)

    Could you tell me what I’m doing wrong?

    Know I’m figuring this out late in the game, but once I get it moving right, I’ll export, fix, and re-import.

    I just want this ONE record to work properly, so I can see precisely what its export looks like.

    Other 2 images are:
    Image 2 is START of search page (lots of categories under it.)
    Image 3 is start of actual LISTINGS on search page WAAAAY below start of multitudinous categories!

    Any ideas?

    in reply to: Tab visible? Active Tab? #423156

    jahusdtc
    Expired Member
    Post count: 162

    Hey, Alex…you got me started in the right direction! Thanks!

    Using your tips, I started exploring. Post was not actually what I needed, but testing that started me thinking.

    Took me several hours to figure out…but answer was whole lot easier than I thought.

    Here goes for someone else who might want to accomplish this. It’s what I used to “test” whether Tab is visible on the Detail Page (in Supreme Directory Theme anyway.)

    I am using it in functions.php when I need to figure out if tab even exists for particular listing.

    
    
    /*
    Use this if want to see if tab is actually showing.
    Here, my tab gd_tab_2 is a tab created by adding custom field fieldset with two custom fields below it.  
    
    Don't want to test existance or population of custom fields separately.  Instead want to see if tab exists -- because GeoDirectory has already determined SOME field in the fieldset (tab) is populated.  GeoDirectory has done the heavy lifting for me with this function...no point in me repeating that!
    */
    
       $my_list_of_tabs = geodir_detail_page_tabs_list();
       $video_tab_showing = (isset($my_list_of_tabs['gd_tab_2']))
       if ($video_tab_showing) {echo 'YES...it shows';} else {echo 'NOPE...not showing';}
    in reply to: Tab visible? Active Tab? #423062

    jahusdtc
    Expired Member
    Post count: 162

    100% correct!

    Thought there might be handy variable or function that would tell me whether ANYTHING was visible because it was populated. (Must remember that term…populated is much more descriptive than “filled.”)

    Thanks!

    in reply to: Tab visible? Active Tab? #423049

    jahusdtc
    Expired Member
    Post count: 162

    Thanks, Guust!

    However, I have a feeling I didn’t communicate well.

    My Video tab (created with fieldset and two custom fields) is showing fine. Doesn’t need to be re-ordered at present.

    What I WOULD like to find out is how to tell whether or not a Tab is actually showing (because it has values in the custom fields that make it up) … OR … if it’s hidden (because it has NO values in the custom fields that make it up.)

    That way I wouldn’t have to check individual field values. Instead, I could just check if the Tab is showing.

    That way if I ADD custom fields to the tab, I don’t have to continually go back and add those individual custom fields to my conditional statement.

    Right now I have to do:
    //Assess whether there’s ANY video (custom field) in their
    //own tab.
    $theres_a_video =
    ((isset($post->geodir_video1) && $post->geodir_video1) ||
    (isset($post->geodir_video2) && $post->geodir_video2));

    Problem would be…if I added an additional custom field named Video3 field, I’d have to remember to come back here and change the code.

    If instead, I could just say something like (pseudo code)
    $theres_a_video = Video Tab is Showing
    then I could just forget about the code and let it just work.

    Is this any clearer? I don’t know if there’s a function that would give me the “Video Tab is Showing” value, but it would be helpful.

    in reply to: Tab visible? Active Tab? #422855

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    in reply to: Tab visible? Active Tab? #422853

    jahusdtc
    Expired Member
    Post count: 162

    Okay, a step further, but…I note that the div coloration extends beyond the a href in my attached image. Can you help me with making it “stop” at the end of the words?

    And would still like to know if I can tell if particular “tab” is showing.

    Here’s my code, in case it helps someone else:

    BTW, the tab I’m trying to add to is the Profile tab, the custom fields are video_1 and video_2.

    This code does NOT check if Video tab is visible — which would be a very nice thing to know — but it DOES check the custom fields that are ON the Video tab. If they’re “filled”, the tab is showing.

    add_action(‘geodir_after_tab_content’,’_my_tab_content_after_x’);
    function _my_tab_content_after_x($tab){
    //echo ‘Tester – tab is ‘ . $tab;
    if($tab== ‘post_profile’){
    if (!(empty(geodir_video_1) or (empty(geodir_video_2))) )
    {
    /*CSS already in stylesheet*/
    $the_string_to_add = ‘<div class=”checkoutourvideo”>Go ahead…Check out our video for more info.</div’;

    echo $the_string_to_add;
    } //custom fields are “filled” so tab shows
    } //tab is the profile tab
    } //_my_tab_content_after_x

    FYI, the CSS I used was:
    div.checkoutourvideo a, div.checkoutourvideo a:hover{color:yellow;margin-top:15px;font-weight:500;}
    div.checkoutourvideo {background:#173587;padding:9px;margin-top:20px;}

    NOTE: The href does not yet go from Profile tab to the Video tab itself. Think Geodirectory forum has helpfully given the solution elsewhere for that! That’s tomorrow’s project!

    in reply to: Tab visible? Active Tab? #422848

    jahusdtc
    Expired Member
    Post count: 162

    Okay, think I figured out #2…the answer is here:
    https://wpgeodirectory.com/support/search/?bbp_search=add+content+to+tab

    But still #1 is pending.

    Best way to handle?

    in reply to: Photos versus Image Upload? #422836

    jahusdtc
    Expired Member
    Post count: 162

    I apologize to both of you. Yes, it works fine. Don’t know what problem was…had bad cold and wonky server. So…I’ll just blame my brain fizzle on those :}

    Sorry I wasted your time.

    in reply to: Css Conundrum #422835

    jahusdtc
    Expired Member
    Post count: 162

    Cute. Thank you very much. Appreciate it.

    in reply to: Css Conundrum #421958

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    in reply to: Photos versus Image Upload? #421644

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    in reply to: Categories in Checkboxes on Edit Screen #420692

    jahusdtc
    Expired Member
    Post count: 162

    Happiness is… a Guust solution!

    That’s it!

    Thank you!

Viewing 15 posts - 46 through 60 (of 162 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount