Title: Page Load Ajax
Author: Jacob N. Breetvelt
Published: <strong>6 de maig de 2021</strong>
Last modified: 10 de maig de 2025

---

Cerca extensions

![](https://s.w.org/plugins/geopattern-icon/page-load-ajax.svg)

# Page Load Ajax

 Per [Jacob N. Breetvelt](https://profiles.wordpress.org/opajaap/)

[Baixa](https://downloads.wordpress.org/plugin/page-load-ajax.1.7.zip)

 * [Detalls](https://ca.wordpress.org/plugins/page-load-ajax/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/page-load-ajax/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/page-load-ajax/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/page-load-ajax/#developers)

 [Suport](https://wordpress.org/support/plugin/page-load-ajax/)

## Descripció

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»]

## Instal·lació

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.

## Ressenyes

![](https://secure.gravatar.com/avatar/c2e6b319da373ef8b7966149020a4b0413cd3125e824e76583ea209d96090a1e?
s=60&d=retro&r=g)

### 󠀁[works perfect!](https://wordpress.org/support/topic/works-perfect-1038/)󠁿

 [webproject1618](https://profiles.wordpress.org/webproject1618/) 1 de juny de 2023

Great plugin!

![](https://secure.gravatar.com/avatar/f6b1db3cc9a2ccc7f48e49bb1478ec986d632acab1dcc42e4415cc3995c5cb90?
s=60&d=retro&r=g)

### 󠀁[Works like a charm!](https://wordpress.org/support/topic/works-like-a-charm-2005/)󠁿

 [simonvinder](https://profiles.wordpress.org/simonvinder/) 12 de novembre de 2021

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.

![](https://secure.gravatar.com/avatar/5161b5f5c3003b0de38b47dfabc9b1fdc91396af2b0672e3ceff0291070fbd7c?
s=60&d=retro&r=g)

### 󠀁[Great!](https://wordpress.org/support/topic/great-13847/)󠁿

 [Miguel](https://profiles.wordpress.org/mhagenaars/) 13 de octubre de 2021

Great plugin!

 [ Llegiu totes les 3 ressenyes ](https://wordpress.org/support/plugin/page-load-ajax/reviews/)

## Col·laboradors i desenvolupadors

«Page Load Ajax» és programari de codi obert. La següent gent ha col·laborat en 
aquesta extensió.

Col·laboradors

 *   [ Jacob N. Breetvelt ](https://profiles.wordpress.org/opajaap/)

“Page Load Ajax” s’ha traduït a 1 configuració regional. Gràcies als [traductors](https://translate.wordpress.org/projects/wp-plugins/page-load-ajax/contributors)
per les seves aportacions.

[Traduïu «Page Load Ajax» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/page-load-ajax)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/page-load-ajax/),
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/page-load-ajax/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/page-load-ajax/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/page-load-ajax/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 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.

## Meta

 *  Versió **1.7**
 *  Darrera actualització **fa 1 any**
 *  Instal·lacions actives **30+**
 *  Versió del WordPress ** 5.1 o posterior **
 *  Provada fins a **6.8.5**
 *  Versió del PHP ** 7.2 o posterior **
 *  Idiomes
 * [Dutch](https://nl.wordpress.org/plugins/page-load-ajax/) i [English (US)](https://wordpress.org/plugins/page-load-ajax/).
 *  [Traduïu a la vostra llengua](https://translate.wordpress.org/projects/wp-plugins/page-load-ajax)
 * Etiquetes
 * [ajax](https://ca.wordpress.org/plugins/tags/ajax/)[page](https://ca.wordpress.org/plugins/tags/page/)
   [performance](https://ca.wordpress.org/plugins/tags/performance/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/page-load-ajax/advanced/)

## Valoracions

 5 sobre 5 estrelles.

 *  [  3 valoracions de 5 estrelles     ](https://wordpress.org/support/plugin/page-load-ajax/reviews/?filter=5)
 *  [  0 valoracions de 4 estrelles     ](https://wordpress.org/support/plugin/page-load-ajax/reviews/?filter=4)
 *  [  0 valoracions de 3 estrelles     ](https://wordpress.org/support/plugin/page-load-ajax/reviews/?filter=3)
 *  [  0 valoracions de 2 estrelles     ](https://wordpress.org/support/plugin/page-load-ajax/reviews/?filter=2)
 *  [  0 valoracions de 1 estrelles     ](https://wordpress.org/support/plugin/page-load-ajax/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/page-load-ajax/reviews/#new-post)

[Visualitzeu totes les ressenyes](https://wordpress.org/support/plugin/page-load-ajax/reviews/)

## Col·laboradors

 *   [ Jacob N. Breetvelt ](https://profiles.wordpress.org/opajaap/)

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/page-load-ajax/)

## Feu una donació

Voleu ajudar a què l’extensió millori?

 [ Feu una donació a aquesta extensió ](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=Page-Load-Ajax&item_number=Support-Open-Source&currency_code=USD&lc=US)