Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Site with Audience Conditional Logic

Discussion in 'Misc WordPress Requests' started by RossMitchell, Feb 3, 2018.

  1. RossMitchell

    Guest

    Reply To: Site with Audience Conditional Logic, by RossMitchell

    I see various ways to do this, essential to all are:
    – If a user is new then you must establish their level and subject.
    – Otherwise you follow the track that a user is in.
    This behavior requires tracking the status of the session, now the concept
    of “a session” is very natural to us humans, but is not particularly natural to a web server and browser, they are using “a connection” protocol which is a different thing. Still there are ways of approximating a session in various ways.

    Though you may be able to create the required mechanisms using hook functions etc,
    I would be creating a child theme instead so that I can take control of manipulating all the page content in its entirety by customizing the page templates.

    You could use cookies. This requires that the user is accepting cookies, fails utterly otherwise. I will not follow this line further as I have not used them this way.

    I would create a page template that did this:
    – If it were a new session I would know because the form variables are not present, so I would present a form that gave the level and subject choices, the view / submit / join button will submit the choices and re-render the page.
    – If the form variables are present then create a hidden form and preserve the variables there so th session can be perpetuated. Use the settings to show the relevant menu and fetch the relevant page content. When the user wants to progress to another page, then rather than using a link as is conventional, the action needs to be dressed as a submit button so that the next page request gets to see the form aspects of this mechanism.
    – You could instead use javascript (and possibly AJAX) to have the page refresh itself, fetch and render the new content, manage navigation etc. This would require that the user have javascript enabled, it would be possible to show friendly failure messages and explanations when javascript was not enabled.

    You could log the IP address and session choices in a custom database table, possibly incorporate the session time to time limit the persistence. Would have to provide for the case where an IP got reused.

    Reply To: Site with Audience Conditional Logic
     
    #1

Share This Page

Monarch Social Sharing Plugin