Skip to content
Permalink
Browse files

Markdown corrections

  • Loading branch information...
seb86 committed Mar 26, 2019
1 parent 31f2fec commit 2e73ccd9ee02c4158385fb71674f3697451e8cfb
@@ -83,4 +83,4 @@ So whenever a post that is formatted for a video, after the content it will disp
---

If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/AutoLoadNextPost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/autoloadnextpost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
@@ -10,7 +10,7 @@ Should the plugin only run if the JavaScript is set in the footer, you can force

Copy and paste the code snippet below to your theme's `functions.php` to add support and it must be hooked to `after_setup_theme`.

> Note: Don't forget to change the theme selectors to match your theme selectors that you have used when developing your theme.
> ✏️ Note: Don't forget to change the theme selectors to match your theme selectors that you have used when developing your theme.
```php
/**
@@ -16,4 +16,4 @@ if ( is_alnp_supported() ) {

---

If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/AutoLoadNextPost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/autoloadnextpost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
@@ -6,7 +6,6 @@ The content container is a crucial part and is where the posts will be loaded in

Weither the theme you have active has a sidebar on a single post or not the single post should have a primary section. This allows the posts to be layered in one by one as new posts are loaded in.


---

If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/autoloadnextpost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
@@ -16,7 +16,6 @@ If you have overriden the repeater template in your theme or plugin but want to

In this example, the repeater template is located at `templates/alnp/content-alnp.php` within a theme folder. Simply apply the filter like so to your `functions.php` file of your theme (_if you are not the original theme developer then this would be preferable if added to a child-theme_) and Auto Load Next Post will load the repeater template located there.


```php
function my_repeater_template() {
return 'templates/alnp/content-alnp.php';
@@ -1,6 +1,6 @@
# Auto Load Next Post Documentation

## For developers
## For Developers

Documentation is available for theme or plugin developers that wish to extend Auto Load Next Post in various different ways. Each action and filter hook has also been documented with references to inline code for added context. If you'd like to support Auto Load Next Post in your own theme or plugin, please read this guide to see how you can support Auto Load Next Post quickly and easily.

@@ -18,9 +18,9 @@ Now when you view any post the comments are no longer shown making the content l

Yes. To view comments for a single post or to respond to a post, simply view that post with either hashtag at the end of the post URL.

View comments – https://yourblogdomain.com/blog/your-post-slug/#comments
View comments – `https://yourblogdomain.com/blog/your-post-slug/#comments`

Post comment response – https://yourblogdomain.com/blog/your-post-slug/#respond
Post comment response – `https://yourblogdomain.com/blog/your-post-slug/#respond`

---

@@ -6,8 +6,7 @@ JavaScript triggers can come in handy when you need something to happen a certai

If you are wanting to trigger a 3rd party script then you may find the **Events** section under Auto Load Next Post settings page useful.

> Note: Not all 3rd party scripts trigger the same way.
> ✏️ Note: Not all 3rd party scripts trigger the same way.
### Entering a post

@@ -85,8 +84,7 @@ $('body').on( 'alnp-previous-post', function( e, previous_post ) {
});
```

> Note: Your JavaScript triggers must be loaded after Auto Load Next Post in order to trigger these callbacks.
> ✏️ Note: Your JavaScript triggers must be loaded after Auto Load Next Post in order to trigger these callbacks.
#### Are you looking for examples?

@@ -4,7 +4,6 @@

If you are facing an issue with Auto Load Next Post then this guide may help you understand why and how it can be fixed.


### Loads the whole page and not just the content

This is most likley because of a permalink issue. Either Auto Load Next Post did not register the custom endpoint it requires or your permalink structure is not friendly.
@@ -15,12 +14,10 @@ This causes the custom endpoint to redirect to the original post permalink while

It's important that you have a clean friendly permalink structure so Auto Load Next Post can work it's magic.


### Getting an error 404 when Ajax makes a request

Most likley this is caused because you previously had an older version and have now updated to the latest version. This is easly fixed. [See the upgrade guide for more](https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/upgrading.md#404-on-ajax-request).


---

If you have any issues with this guide, or the documentation that is linked throughout, please [open a new issue](https://github.com/autoloadnextpost/alnp-documentation/issues/new) in this repository for it to be reviewed. Thank you!
@@ -8,11 +8,13 @@ The `alnp-post-loaded` callback is public JavaScript function dispatched after e

The following callback examples are used to initiate 3rd party scripts after successful Ajax requests.

Developers: You can copy and paste these into your theme so your theme supports these plugins with Auto Load Next Post.
> Developers: You can copy and paste these into your theme so your theme supports these plugins with Auto Load Next Post.
<!--Users: Go to the extension section under Auto Load Next Post settings page to install the support you require.-->

#### Easy Fancybox - https://wordpress.org/plugins/easy-fancybox/
#### Easy Fancybox

Source: [https://wordpress.org/plugins/easy-fancybox/](https://wordpress.org/plugins/easy-fancybox/)

You can either use this code snippet or use the events section via the Auto Load Next Post settings to trigger Easy FancyBox.

@@ -24,7 +26,9 @@ $(function() {
})(jQuery);
```

#### AddToAny - https://wordpress.org/plugins/add-to-any/
#### AddToAny

Source: [https://wordpress.org/plugins/add-to-any/](https://wordpress.org/plugins/add-to-any/)

```js
$(function() {
@@ -36,19 +40,23 @@ $(function() {
})(jQuery);
```

#### Addthis - https://wordpress.org/plugins/addthis/
#### Addthis

Source: [https://wordpress.org/plugins/addthis/](https://wordpress.org/plugins/addthis/)

```js
$(function() {
$('body').on( 'alnp-post-loaded', function( e, params ) {
if ( typeof addthis !== 'undefined' ) {
addthis.layers.refresh();
addthis.layers.refresh();
}
});
})(jQuery);
```

#### ShareThis - https://www.sharethis.com/
#### ShareThis

Source: [https://www.sharethis.com/](https://www.sharethis.com/)

```js
$(function() {
@@ -60,7 +68,7 @@ $(function() {
})(jQuery);
```

#### Facebook Comments, Like Button, Share etc.
#### Facebook Comments, Like Button, Share etc

```js
$(function() {
@@ -72,6 +80,8 @@ $(function() {

#### Jetpack - Tiled Galleries

Source: [https://jetpack.com/](https://jetpack.com/)

```js
$(function() {
$('body').on( 'alnp-post-loaded', function( e, params ) {
@@ -83,7 +93,7 @@ $(function() {

### Other 3rd party plugins

> These plugins have not yet been tested with Auto Load Next Post.
> ✏️ Note: These plugins have not yet been tested with Auto Load Next Post.
* [MetaSlider](https://wordpress.org/plugins/ml-slider/)
* [Easy SwipeBox](https://wordpress.org/plugins/easy-swipebox/)
@@ -4,14 +4,12 @@

Testing or debugging is a common thing for developers but users may have very little knowledge on how to go about doing so. This guide will help you figure out how to test with Auto Load Next Post.


### Beta Testing

First and foremost, I want to say thank you if you are beta testing or interested in beta testing future releases. Your feedback is important to making Auto Load Next Post better.

You can download the beta tester [here](https://github.com/AutoLoadNextPost/alnp-beta-tester/releases). I would always recommend beta testing in a staging environment.


### Debugging a White Screen or Error 500

If you find a white screen or error 500 that usually means something has triggered a PHP error, but errors are hidden on your server. To find out the cause of the error you have two choices:
@@ -25,7 +23,6 @@ Enabling `WP_DEBUG` involves editing your wp-config.php file and changing, or ad

When this is done, a more useful error message should be shown. Most of the time this contains the name of the plugin and the line number causing the issue allowing you to act.


### Debugging JavaScript

Debugging Javascript is also possible. If you want to read the console logs with the browsers developer tools you will need to enable `SCRIPT_DEBUG`.
@@ -36,7 +33,6 @@ By default your `wp-config.php` file will not have this set so you will need to

Once you have this added, Auto Load Next Post will load the unminified version of the Javascript on the front end.


If you have followed the instructions above to enable `WP_DEBUG`. Auto Load Next Post also allows you to...

## Debugging Functionality Issues
@@ -20,8 +20,7 @@ When Auto Load Next Post is activated, default theme selectors are set for you.

I recommend looking at the [CSS selectors reference](https://www.w3schools.com/cssref/css_selectors.asp) at w3schools.com if you are not familar with CSS to help you.


#### Default Theme Selectors
### Default Theme Selectors

By default we set each theme selector with the element followed by a `.class` or `#id`.

@@ -32,7 +31,6 @@ By default we set each theme selector with the element followed by a `.class` or
| Post Navigation | `nav.post-navigation` |
| Comments Container | `div#comments` |


### How to find your theme selectors

First, make sure that you are viewing a single post on the site you are setting up Auto Load Next Post on. Then depending on your browser, you need to open the developer tools to inspect the theme elements.
@@ -53,14 +51,12 @@ Once you have found the content container, go to the settings page and place the

> If the element has more than one class applied then only enter the first class. This is 99% the main class. If there is not a class but an ID then simply enter the element name followed by the ID name instead.

#### Post title

Next will be the post title. This one in particular I find does not change from the many themes that I have looked at so you may find that you do not need to change this one.

This will be the first heading `<h1 class="entry-title">` but may be added differently with a featured image depending on how the theme is developed.


#### Post navigation

Finally, the post navigation. Auto Load Next Post reads the post navigation once the user has reached or is near the end of the initial post to load the next post. This is a crucial step. Unfortunately there is no guarantee that your theme may have a post navigation on a single post. Should that be the case you will need to [apply one](https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/post-navigation.md).
@@ -4,9 +4,9 @@

If you had previously installed Auto Load Next Post before with a version prior to 1.5 then there are two things that you may need to address. Both are really simple and quick to do.

> Quick Note: Auto Load Next Post works by registering a unique endpoint to any post type and is used to filter the repeater template that is called with an Ajax request.
> ✏️ Note: Auto Load Next Post works by registering a unique endpoint to any post type and is used to filter the repeater template that is called with an Ajax request.
#### 404 on Ajax Request
### 404 on Ajax Request

In the early versions of Auto Load Next Post the endpoint was not distinct and could have caused a compatibility issue with other plugins that may use the same endpoint so I made a change in version 1.5.

@@ -18,7 +18,7 @@ If you having been experiencing a 404 on Ajax requests with the new endpoint the

Once saved, view any single post with `alnp/` at the end to view the repeater template load.

#### Renaming the repeater template
### Renaming the repeater template

Just as the endpoint was changed for the Ajax request, the repeater template file name was also changed. If you have a custom repeater template file within your theme, make sure it is labelled to the new file name.

0 comments on commit 2e73ccd

Please sign in to comment.
You can’t perform that action at this time.