Forum Replies Created

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • I mean, it is by virtue of the fact that it is in a child category of the parent category. The parent category wasn’t manually checked off when making the post, only the child category. That’s actually the point of my question though, because if I check off both the parent & child category, then the URL shows up as:

    mysite.com/parent-cat/post-url

    What I want the URL to be is:

    mysite.com/parent-cat/child-cat/post-url

    The only way to get the URL to show up as mysite.com/parent-cat/child-cat/post-url is to only select the child category of the parent.

    I just then also need to have the parent category appear, along with the child category, in the area where it shows the categories the post is present in. There has to be a way to do this, as the parent category is appearing in the URL and in the breadcrumbs, but not above the post content.

    Absolutely, no problem (thank you!)

    You’ll see in the blog post I linked to, the word “board” is the only word above the title. That is the child category that post is in, but the parent category doesn’t appear. You’ll see the parent category appears in the “breadcrumbs”, but I need it to also appear in the linked to categories.

    …help

    Anybody?

    Still stuck on this, any ideas?

    Hello Peter,

    You sir, are the man!

    That works beautifully…100% perfect working solution.

    I sincerely appreciate the excellent top notch support provided, especially for something so far from being a “theme issue”.

    You guys have earned my business for life and I’ll be singing your praises anywhere anybody will listen.

    Just a friendly bump :)

    I’ve got to say, the support here is stellar. Far better than from other places I’ve purchased themes/theme memberships from, thanks so much! I’ll be putting up a review about your theme/support on blackhatworld as my way of saying thanks.

    I do have one last question though…I tried putting the above logic into my functions.php file, and it broke the theme (the entire site just was white space). To resolve it, I had to download the functions.php file from wp-content/themes/enfold/functions.php via FTP, remove the added code and reupload it.

    I have no child themes installed, it’s just the activated Enfold theme from within the Enfold folder under wp-content/themes/enfold. Here is what my functions.php file looked like after I added the above code (which I had to remove because it broke it). This is from line 1 (and everything beneath what I’ve pasted here, is exactly as it comes with a fresh install of the theme…nothing added or modified):

    <?php
    global $avia_config;
    /*
    
     * if you run a child theme and dont want to load the default functions.php file
    
     * set the global var bellow in you childthemes function.php to true:
    
     *
    
     * example: global $avia_config; $avia_config['use_child_theme_functions_only'] = true;
    
     * The default functions.php file will then no longer be loaded. You need to make sure then
    
     * to include framework and functions that you want to use by yourself. 
    
     *
    
     * This is only recommended for advanced users
    
     */
    
     
    /* enable custom DAP hide/show menu logic */
    
    if(isset($avia_config['use_child_theme_functions_only'])) return;
    add_theme_support('avia_conditionals_for_mega_menu');
    
    if(!function_exists('avia_condition_customrole'))
    
    {
    
        function avia_condition_dap()
    
        {
    
            if(Dap_Session::isLoggedIn()) return true;
    
            return false;
    
        }
    
    }
    
    add_filter('avf_avia_menu_conditions','avia_add_conditional_options', 10,1);
    
    function avia_add_conditional_options($options){
    
    $options['avia_condition_dap'] = array('title' =>__('User Logged in (Dap)', 'avia_framework')),
    
    return $options;
    
    }
    /* end conditional menu logic addition */
    in reply to: Custom Conditional Logic for Hide/Show Menu Items #231433

    Hello Ismael,

    Thank you for your reply. The Zen menu logic unfortunately won’t help me. The wordpress “is user logged in” is close to what I need, but not quite.

    Enfold already has the conditional menu logic, but I need an additional “if” condition. Instead of Enfold doing a if ( is_user_logged_in() ) { ... } and then hiding/showing menu items, I need it to do a if(!Dap_Session::isLoggedIn() ) { and then hide/show certain menu items.

    I wouldn’t even mind replacing the existing Enfold condition of “if user is logged into wordpress” code with the “if user is logged into dap” code, since I’ll never need the “if is logged into wordpress” function.

    In other words, I literally need Enfold to do a custom conditional menu logic check, and not one of the preexisting conditional menu logic checks, with that check being: if(!Dap_Session::isLoggedIn() ) {

    in reply to: Custom Conditional Logic for Hide/Show Menu Items #231119

    EDIT: What’s below doesn’t really solve my problem, I’m giving it as an example to possibly further assist with getting a “real” solution to the problem.

    As a “hack” to get around this, I’m currently using the following code in my header.php file, just above the closing head tag:

    <?php
    if(!Dap_Session::isLoggedIn() ) { ?>
    <style>
    #menu-item-1858 {display:none;}
    #menu-item-1728 {display:none;}
    #menu-item-1867 {display:none;}
    #menu-item-1849 {display:none;}
    </style>
    <?php } ?>

    Where the given menu items need to be hidden (there are others, this is just an example) if the user is not logged into DAP. It’s working, but not when the menu is in “mobile” mode (my theme is set to be responsive).

    Ideally, I need something to modify the Enfold conditional logic to allow for the “dap is logged in/out” condition and not just the “wp logged in/out” condition.

    • This reply was modified 10 years, 8 months ago by crazyflx.

    I only know the answer to this fortuneRice, because I’m in the middle of working on a related issue and one of the moderators here was kind enough to help me out.

    Enfold does have support for conditionally showing menu items, see here: https://kriesi.at/support/topic/enfold-conditional-menu/

    Hello Dude,

    I, again, appreciate the help. Getting over this last hiccup will be the last thing I need help with as my site will be complete.

    I checked your two provided links, and while they don’t completely solve my issue, they did help…indirectly. I’m thinking I can use enfolds conditional menu check (which I’ve successfully enabled) with DAP’s “is logged in?” check. I just need to hide menu items if the user is not logged into DAP (regardless of whether or not they’re logged into/out of wordpress).

    DAP uses the following check to check whether a user is logged into/out of DAP:

    if( !Dap_Session::isLoggedIn() ) {
    //DO SOMETHING FOR USERS NOT LOGGED INTO DAP
    }
    else {
    //DO SOMETHING FOR USERS LOGGED INTO DAP
    }

    Now that I’ve enabled the conditional menu functionality within Enfold, I see that one of the conditional options is “hide/show if user is logged into/out of WP”

    Is there any way to use the DAP logged in/logged out check instead of the wordpress logged in/logged out check?

    • This reply was modified 10 years, 8 months ago by crazyflx.

    Hello Dude,

    Thanks very much for your help, I appreciate it. Unfortunately, that did not work either. It yields the same results as the previously entered code.

    My entered page ID’s (as entered within the Relevanssi settings) that should be excluded from search results are successfully excluded from the search results on the actual WP search results page. They are still being returned in the “instant search” results by enfold though.

    Thanks again for the help…do you think you could point me in the right direction with what I should be asking the folks over at Relevanssi?

    This reply has been marked as private.

    EDIT: forgot to make private

    • This reply was modified 10 years, 8 months ago by crazyflx.

    Hello Devin!

    Thanks so much for the quick reply, I really appreciate it. Unfortunately, it hasn’t yielded any different results. Here is what the beginning of my enfold functions.php file looks like (beyond what I’ve copy/pasted here, there are now zero changes…it’s exactly as it comes in a fresh download):

    <?php
    
    global $avia_config;
    
    /*
     * if you run a child theme and dont want to load the default functions.php file
     * set the global var bellow in you childthemes function.php to true:
     *
     * example: global $avia_config; $avia_config['use_child_theme_functions_only'] = true;
     * The default functions.php file will then no longer be loaded. You need to make sure then
     * to include framework and functions that you want to use by yourself. 
     *
     * This is only recommended for advanced users
     */
    
    if(isset($avia_config['use_child_theme_functions_only'])) return;
    
    /* adding filter for instant search to return relevanssi filtered pages/posts */
    
    add_filter('avf_ajax_search_function', 'avia_init_relevanssi', 10, 4);
    function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults)
    {
        $function_name = 'avia_relevanssi_search';
        return $function_name;
    }
    
    function avia_relevanssi_search($search_query, $search_parameters, $defaults)
    {
        global $query;
        $tempquery = $query;
    
        $tempquery->query_vars = $search_parameters;
        relevanssi_do_query($tempquery);
        $posts = $tempquery->posts;
    
        return $posts;
    }
    
    /*end relevanssi filter */
Viewing 16 posts - 1 through 16 (of 16 total)