How to Building <title> and breadcrumbs: tight integration with Wordpress?

Discussion in 'Integration' started by macks, Feb 3, 2012.

  1. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
    Hi guys,

    I'm currently switching over to aMember from DL Guard because I want my shopping/membership solution to seemlessly integrate to my wordpress blog.

    I'm really wanting to make this integration as smooth as possible, so I used the aMember 4 option to use my Wordpress header and footer-files. Here are my questions:

    1. How can I dynamically change the title (the one in <title>-tags) to reflect the current page of aMember? Are there any variables I can access in my Wordpress-Header-file?

    2. Is there by chance a way to use breadcrumbs? Or generally speaking: I just need to access some system variables of aMember so I can generate them myself or display things like "step 2 of 3" or something like that. Is there something like this I can use?

    Thank you for your help. :)

    Cheers

    Macks
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Macks,
    1. Should work by default.if this does not work in your theme, try to use $GLOBALS[title] variable within it.
    2. Sorry not sure I understand, where you want to use this exactly?
  3. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
    Hi Alexander,

    thank you for getting back to me.

    I actually just need a way to access some variables of amember, so I can generate the title myself. $GLOBALS['title'] isn't working for me, it doesn't display anything. I removed wp_head() from the theme, because I'm using custom stylesheets for integration and don't want to use the ones amember inserts.

    But even if I leave wp_head() in my theme, it doesn't generate the title for me. I could imagine that this is due to a plugin I'm using called "all in one seo pack" which overrides titles.

    That is why I want to hard code titles into my theme. Is there any documentation on global variables used by amember available?

    Macks
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    aMember use add_filter("wp_title", array($this, "addTitle"), 10); in order to display own pages title(this is from plugin file wordpress.php ).

    So if you have wp_head block removed, it just will not work. In regards to "all in one seo pack" try to increase amember's filter priority.(last argument in above call)
  5. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    No there is no such shortcodes. But you still can get info about logged in user. What info you need to access exactly?
  7. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
    Alexander, thank you for your response. That's too bad, I think it would be a great feature. I was hoping I could build a custom navigation with dynamic links directly in Wordpress, since I'm not quite familiar with the amember Templating system.

    Thank you anyways!
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    I believe you still can do this.
    Have a look to menu protection options in post/page protection settings. (you can add/remove page links from menus depends on user's access permissions).
    Also, check aMember Menu widget.
  9. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
    Thank you Alexander, I think I can make this work now.
  10. macks

    macks New Member

    Joined:
    Mar 31, 2011
    Messages:
    9
    Ok, wait… aren't I supposed to be logged into Wordpress if I'm logged into aMember? And isn't aMember supposed to synchronize user databases with Wordpress?

    This seems not to be working. I noticed it, when I wanted to use the Wordpress template-tag "is_user_logged_in()" – my amember subscribers don't appear in the Wordpress backend and are (obviously) not being logged in.

    What can be going wrong?
  11. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Here what tyou need to check:
    1. make sure that root urls in both aMember and wordpress are use the same domain name. There can be issues if domains are different(for example www.domain.com and domain.com).
    2. Make sure that you have valid not-default security keys in wordpress config.
    3. Security keys in amember's plugin configuration must be exactly the same as in plugin config.
    4. Check aMember CP -> Protect Content -> Integration and make sure that you set integration for wordpress plugin.
    5. Also, just a note, single login will not work for users who have groups listed in aMember CP -> Setup -> Wordpress -> Admin Groups

Share This Page