Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Wierdbeard65

    (@wierdbeard65)

    Sorry for not replying sooner!

    As marvmckay said, you can set up the redirection directly in TML. My problem was that it was ignoring those redirections.

    My default, the login link is part of the sidebar and you don’t need to worry about it (THAT one works). My theme modifies this though as I don’t have a sidebar at all. I add the login / logout link to my main menu with the following code (in the functions.php of my theme):

    add_filter('wp_page_menu', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
        $loginoutlink = wp_loginout('',false);
    	$pos=strrpos($items,'</ul>');
    	if($pos ===false){
            $items .= '<li>'. $loginoutlink .'</li>';
    	}else{
    	   $items = substr($items,0,$pos).'<li>'. $loginoutlink .'</li>'.substr($items,$pos);
    	}
        return $items;
    }

    You can see the call to wp_loginout() there on the first line of the function and it was this that I changed from my original attempt where the first parameter was ‘index.php’ instead of ”

    HTH

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Ok, after a LOT of digging around and randowm playing, I think I have found the problem…

    I am using the function wp_loginout() to generate the URL which I am adding to my menu bar through my theme’s functions.php (I don’t want a sidebar.)

    Anyway, I was using it as wp_loginout('index.php',false) since I wanted to go back to the index page. I have changed the call to wp_loginout('',false) and it now seems to follow the settings made through TML ??

    Just posting here in case anyone else stumbles across this problem….

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Oops, sorry, just saw the “open a new thread” comment. Opening…

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Hi,

    Ok, I have played around with this and, for the most part, got it working very nicely.

    I have an odd one, though!

    I have a bunch of bookings. I have a function set up that modifies the search.

    Ok, so it works fine for most categories, but some fail to show up!

    I put a VAr_Dump into the end of my filter function and this is what it is returning:
    array(37) { ["limit"]=> bool(false) ["scope"]=> array(2) { [0]=> string(10) "2013-08-25" [1]=> string(10) "2013-10-07" } ["order"]=> string(3) "ASC" ["orderby"]=> string(16) "event_start_date" ["format"]=> string(0) "" ["category"]=> array(3) { [0]=> string(2) "20" [1]=> string(1) "2" [2]=> string(2) "40" } ["tag"]=> int(0) ["location"]=> bool(false) ["event"]=> bool(false) ["offset"]=> int(0) ["page"]=> int(1) ["recurrence"]=> int(0) ["recurrences"]=> NULL ["recurring"]=> bool(false) ["month"]=> string(0) "" ["year"]=> string(0) "" ["pagination"]=> bool(true) ["array"]=> bool(true) ["owner"]=> bool(false) ["rsvp"]=> bool(false) ["bookings"]=> bool(false) ["search"]=> bool(false) ["near"]=> bool(false) ["near_unit"]=> bool(false) ["near_distance"]=> bool(false) ["ajax"]=> bool(false) ["status"]=> int(1) ["format_header"]=> string(0) "" ["format_footer"]=> string(0) "" ["town"]=> bool(false) ["state"]=> bool(false) ["country"]=> bool(false) ["region"]=> bool(false) ["blog"]=> int(1) ["private"]=> bool(true) ["private_only"]=> bool(false) ["post_id"]=> bool(false) }
    As you can see, I am searching for categories with ID’s 20, 2 and 40. I have events in all three actegories (although only one category per event). My Category 20 and Category 2 events show up, but my 40 doesn’t!! If I change it’s category to 20 or 2, it shows up fine, so I don’t think it is anything to do with the event itself.

    I have dried varying the order of the categories in the search, but no-go.

    This is driving me nuts – can you suggest where to go from here?

    TIA

    Thanks, Dude!

    I figured out that I had to get rid of it via FTP. The strange thing was that I re-added it and it was fine!

    Anyway, I saw the update and have applied it, so hopefully all is well now.

    Thanks for your efforts in producing this plugin!

    I have just experienced the same behaviour. No MultiSite or anything like that.

    I’m with BlueHost. Just setting up the site, but now I’ve hit a dead-end as I can no longer log in to my site as my Administrative user is “pending confirmation”….

    HELP!

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    You, Sir, are a Star! Who do I need to write to in order to recommend you for a raise?

    Only two comments…

    1. The function that builds the menu appears to have a bug. wp_page_menuadds the wrap-around tags for the list and the div ($menu = '<ul>' . $menu . '</ul>';
      $menu = '<div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n";) towards the end, but before the filter is applied ($menu = apply_filters( 'wp_page_menu', $menu, $args );, so my link didn’t appear in the menu (although the code was being executed). I swapped these lines over and it worked!! How should I reprt this?
    2. With respect to the WordPress developers, this isn’t easy to find in the documentation!

    Anyway, seems to be working now. Many, many thanks ??

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Ok,

    Now I’m getting somewhere!

    I was (well, still am!) trying to add my link to the end of the auto-built menu that is created when the page loads. This menu has all the pages and sub-pages automagiacally created based on the pages and sub-pages on my site. I therefore hadn’t created a menu using the dashboard.

    I have now created a custom menu and it all works (link added, as required).

    BUT

    Now I lose the dynamically generated menus! I have checked the box marked Automatically add new top-level pages but if I then leave the menu empty, I have an empty menu. If I add pages, these pages (only, it would seem) are added. My dynamic menu gets updated depending on who (if anyone) is logged in, so I don’t want to fix it with a custom menu, as such.

    Does the built-in menu have a name I can reference to add my link to it?

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Hi,

    Thanks for the reply!

    The quick answer is “Both”.

    In the Calendar, (as a calendar view) I only want to show events in certain categores.

    For Unregistered users, only those in a category I have created called “Public”

    For registered users, those Public events as well as the events in the “Pack” category and the category / categories associated with the den(s) thei parent’s son(s) are in. Committe members need to see the committe events as well.

    And so on.

    I have managed to get something working, but it is very Kludgy as I have customized the full-calendar.php script for my theme. I would rather modify the query that gets the events in the first place, if possible?

    When it comes to the ics files, I want a link at the bottom of each of the calendars (above) that provides the ics feed for that combination of categories. I looked at the thread you linked and it certainly provides some room for investigation but, unless I am very much mistaken, it only allows for a feed on a per-category level, not a feed based on a combination of multiple categories?

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Ok,

    I tried using die() and sure enough, my function is not called.

    I then switched to the TwentyTwelve theme, but the same thing in that theme’s functions.php and again, it isn’t called ?? So it isn’t my theme.

    Has the name of the filter changed in the most recent WordPress, perhaps?

    I did a grep of all the files in the WordPress directory tree to see which file used the filter and none showed up…. (Although I haven’t figured out enough of how WordPress works to know if that is fair. My search would only work if the string wp_nav_menu_items appears as a single unit and, having seen other parts of the code, I know it is quite possible that it is built on the fly.

    More telling is that when I go to the docs, I cannot find mention of a filter called wp_nav_menu_items….

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Thanks for getting back to me.

    I tried several variations I found online. All basically looked like:

    // functions.php
     function add_login_logout_link($items, $args)
     {
       if(is_user_logged_in())
       {
         $newitems = '<li><a title="Logout" href="'. wp_logout_url('index.php') .'">Logout</a></li>';
         $newitems .= $items;
       }
       else
       {
         $newitems = '<li><a title="Login" href="'. wp_login_url('index.php') .'">Login</a></li>';
         $newitems .= $items;
       }
       return $newitems;
     }
     add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);

    I tried adding something to the function to verify it gets called, and it doesn’t seem to be ??

    Thread Starter Wierdbeard65

    (@wierdbeard65)

    Thanks,

    I wasn’t aware that what I was looking for actually was a customization.

    *.ics feeds are mentioned all over the place, as are categories. I assumed they were part of the base product but that I couldn’t find the documentation :-/

    Ahh well.

    I have no budget, so the pro version is no good for me. I will have to look at alternatives.

    This is key for my proposed application. I am working on a relatively closed-community site (For a Cub-Scout pack) and the politics of logins is unbelievable!

    I actually want to provide the option to login with Facebook / Twitter / Google / Yahoo etc as well as a local account for those paranoid folks that like to keep it all seperate.

    I know it is nuts, but about 60% of the discussions so far have been about this (although they don’t know it!) There is a group who want a FaceBook page and another group who won’t use Facebook on principal!

    So, how about it folks?

Viewing 13 replies - 1 through 13 (of 13 total)