Support » Plugin: AppPresser - Mobile App Framework » dyname page loading

Viewing 12 replies - 1 through 12 (of 12 total)
  • See if this works.

    function my_custom_callback( $classes ) {
        //$classes is an array.
        $classes[] = 'no-ajax';
        //return it back to the filter so it can be applied
        return $classes;
    }
    add_filter( 'body_class', 'my_custom_callback' );

    ok, that’s fine,
    but I need to disable for a specific page

    ):

    function my_custom_callback( $classes ) {
        global $post;
    
        if ( is_page( 'ENTER PAGE SLUG OR ID HERE' ) {
            $classes[] = 'no-ajax';
        }
    
        //return it back to the filter so it can be applied
        return $classes;
    }
    add_filter( 'body_class', 'my_custom_callback' );
    function my_custom_callback( $classes ) {
        global $post;
        if ( is_page('chat')) {
            $classes[] = 'no-ajax';
        }
        //return it back to the filter so it can be applied
        return $classes;
    }
    add_filter( 'body_class', 'my_custom_callback' );

    doesn’t work

    i’d keep tinkering with that one, it’s on the right path. May not be pulling in the $post correctly. Worth exploring though.

    I’m sure the slug of my page is ‘chat’, I do not understand that I’m doing wrong

    I’m about to upload my first application with apppresser but this bug is limiting me,
    any other suggestions?

    thank you!

    can you confirm the class is ending up on the body tag?

    View post on imgur.com

    I’m going crazy jaja ):

    My url:
    http://martinbeasnunez.com.ar/app/

    if you go to ‘chat’ you’ll not load the chat
    but if you go directly to

    http://martinbeasnunez.com.ar/app/melian/chat/
    works

    Well, that answered half of the issue. As you can see with the following:

    <body class="page page-id-68 page-child parent-pageid-9 page-template-default no-ajax not-logged-in">

    The class is actually getting added. However, that brings up a different issue of the no-ajax class not working like it should. That said, I’ll get this filed as an issue and we can look into it. Do remember we’re still in beta so bugs like this can be expected. 🙂

    Sure, I understand
    To launch this release, I think disable the dynamic load on the app, it will be better
    Thanks

    As followup, I was incorrect about how the no-ajax class was meant to work.

    You add that class to the <a> links themselves, and the urls that the class is added to will load normally.

    Hope that clears confusion up for anyone who may be coming around here.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘dyname page loading’ is closed to new replies.