이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Page Load Ajax

설명

The purpose of this plugin is to minimize page load time and resource usage by updating the page title and content only rather then reloading the entire webpage.
The new contents and titles are fetched by ajax calls.

Restriction:
As the rest of the page like header including all styles and scripts, footer and sidebars are not affected, you should only use this to switch between pages with the same overall layout and requirements.

You can enter shortcodes in the page content that will show up as a button or a text link.
When activating the link, the pages title and content will be replaced by the title and content of the specified page.

There are four possible independant arguments to the shortcode:
– page (required). This can be the page title or the page id.
– text (optional). The button text or textlink text.
– title-elm (optional). The title element id or class if it is not the default as entered on the settings page.
– content-elm (optional). The content element id or class if not default.

Examples: [pla page=”Tet page”] [pla page=”5″ text=”Go to the testpage”] [pla page=”My Page” content-elm=”#my-div”]

설치

After standard installation, one should specify the preferences on the WP Settings -> Page Load Ajax settings admin page.
It is important to know the html element id or class of the page title and page content. This is dependant of the theme being used.
Id’s should be prefixed by a hashtag (#) and classes by a dot (.) when specifying these settings.
IMPORTANT: After installation: go to the WP Settings -> Permalinks admin page and acitvate the Save Changes button, even when you did not changed anything.

후기

2021년 11월 12일
I’ve been trying to wrap my head around loading content into a specfic div from other pages, without actually refreshing the page. Wanted to use Ajax, but being the rookie I am, I never managed to do it. This did the trick! Great little plugin.
모든 3 평가 읽기

기여자 & 개발자

“Page Load Ajax”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Page Load Ajax”(이)가 1 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Page Load Ajax”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

  • Initial release.

1.1

  • Added do_shortcode filter to widget text to enable [pla] shortcdes in widgets to create pseudo menus.

1.2

  • It is no longer required to save the setup -> permalink admin page after installation.

1.4

  • Added menu interface. You can now let your menu items work like PLA buttons.
    To activate, you need two tings to do: Tick the box ‘Convert menu’ on the pla settings page,
    and modify your theme, so the PLA menu walker will be actvated.
    Example:

Change:

    <?php
        wp_nav_menu( ['theme_location' => 'primary'] );
    ?>

Into:

    <?php
        $args = array();
        $args['theme_location'] = 'primary';

        // Add pla menu walker only when pla is activated
        if ( class_exists( 'PLA_Menu_Walker' ) ) {
            $args['walker'] = new PLA_Menu_Walker();
        }
        wp_nav_menu( $args );
    ?>
  • Added custom code. After the new content has been loaded to the page, a custom js function may be called to execute any js code.
    Write your custom js function and activate it e.g. by entering it in plugin Simple Custom CSS and JS.
    Your function should have the name plaCustomFunction() and supports one argument being the current page id.
    Example that makes an element be hidden on page 13 and shown otherwise:

    <script>
        function plaCustomFunction( id ) {
    
            if ( id == 13 ) {
                jQuery( '#MyDemoElm' ).hide();
            }
            else {
                jQuery( '#MyDemoElm' ).show();
            }
        };
    </script>
    

1.5

  • Added checkbox to the admin page: Update addressline. When ticked, the browsers addressline will be updated to the permalink of the fetched page.

1.6

  • Now handles page with posts correctly.

1.7

  • Fixed browser back functionality.