• Your plugin is truly awesome.

    The only complaint I have is that if you have say 50k records, Search engines can only index one random page of content for the 50K records because the pages are not numbered in the url when changing pages.

    Is there any way to make clicking on page 1,2,3,4 etc go to /?page1,2,3,4 etc in the URL?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @siliconfold,

    Thanks for your compliment! ??

    You can jump to a specific page, but this requires some custom javascript code. In its simplest form the javascript is added to the advanced settings section in field advanced options like this:
    { "initComplete": "function(settings, json) { jQuery('#your-table-id').DataTable().page( 1 ).draw( false ); }" }

    This code will jump to the second page. Please note that page numbers are zero based.

    But this code is static and there is no way to change the page number dynamically within the advanced settings section. To make it dynamic, you have to create your own javascript function and call that function from the initComplete event like:
    { "initComplete": "function(settings, json) { yourJavaScriptFunction(); }" }

    This would allow you to add an argument to your page request and use it in yourJavaScriptFunction() to jump to a specific page number.

    But I wonder how a page number is useful for a table containing 50k rows? Wouldn’t it be much nicer (more user friendly) to add a search form in front of your table? Search forms are explained here:
    https://wpdataaccess.com/docs/data-publisher/search-form/

    Any thoughts?

    Best regards,
    Peter

    Thread Starter siliconfold

    (@siliconfold)

    Well I don’t think you understand the point I’m trying to make.

    Imagine you have a website with only one page as shown:

    https://example.com/data/

    This single page uses your plugin, which has a database of 50K records behind it.

    The way you’re plugin is built currently, Google can only see one page. Thats it. So if you were to search Google for example.com it would only return one page which is /data/

    However, if you made the pagination of your plugin link to a “separate page” for blocks of 10 for the 50k records. Such as /data/2/, /data/3/, /data/4/, /data/5/ etc

    Google will now see that example.com has 5,000 pages! This is extremely powerful.

    Google does not follow javascript well, so you’re above solution wouldn’t be good for this purpose.

    I hope you understand now….

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @siliconfold,

    Thanks for clarifying! That makes a lot more sense. ??

    I’m not a SEO expert, but I guess the problem is that Google does not follow the pagination buttons. Right?

    What happens if you add a next and previous page button manually to a hidden element? Will Google follow these buttons?

    If so, you can use the javascript code previously mentioned to jump between “table pages” and make sure Google loads the correct data.

    Would that work?

    Best regards,
    Peter

    Thread Starter siliconfold

    (@siliconfold)

    I’m not a SEO expert, but I guess the problem is that Google does not follow the pagination buttons. Right?

    Thats half the problem, the other half is the URL doesn’t change.

    What happens if you add a next and previous page button manually to a hidden element? Will Google follow these buttons?

    It will only work if the URL changes, and javascript is not used. Google does read some java but it’s not guaranteed.

    You don’t have to be an SEO expert to understand all the data beyond the first page is currently invisible to Google. Even if Google can follow the next, or page links, it still has to be able to reference that new set of loaded data somehow eg, example.com/data/2,3,4,5 etc

    So when people click on example.com/data/2 in Google search results they are presented with the 2nd page of data

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Correct! You need to add some custom code to add the links and process the arguments, but I think it can be done.

    Give me some time to check this out. I’ll get back to you when I have a solution…

    Best regards,
    Peter

    Thread Starter siliconfold

    (@siliconfold)

    Cool ??

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @siliconfold,

    Got it working! ??

    You can download the code blocks from here:
    https://code-manager.com/code/?wpda_search_column_code_name=%seo%

    There are two code blocks:
    (1) php back-end code that adds a rewrite rule to add the page number to the url
    (2) javascript function that adds the buttons to the next and previous pages

    Please check the description of the code for additional information about the installation and configuration. To test if everything works, just add /pg/3 at the end of the url. It works if you see page 3 including a previous and next page link.

    Can you give it try…?

    Thanks,
    Peter

    Thread Starter siliconfold

    (@siliconfold)

    I was going to test it today, and unfortunately I realized that the content itself is not view-able in the source. You can only see Json calls not actual text rendered. I’m looking for a solution but unless this is addressed, Google may not even be able to see any of the content at all….

    Thread Starter siliconfold

    (@siliconfold)

    So to figure out if Google is indexing the content correctly I tested your site and it does appear as though it is…

    runamuck site:wpdataaccess.com

    However, some pages don’t show the ajax info

    I’m exploring some wordpress caching plugins to see if it makes this work a bit better…

    Thread Starter siliconfold

    (@siliconfold)

    So after some more checking if I use the [wpdadiehard project_id=”1″ page_id=”1″] function, data is displayed as html in the source however this method doesn’t seem to have much control over the output

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @siliconfold,

    Shortcode wpdadiehard uses Data Projects. It’s different tool with different objective. But you can index your Data Publisher table as well.

    You need to download, import and activate the code mentioned in my previous post first. You should get this:
    https://ibb.co/McVwYdD

    Then activate the code in your publication:
    https://ibb.co/nMjLdRb

    After that you need to add the code to your publication page:
    https://ibb.co/bv1JJx4

    You can now open the publication at a specific page using parameter pg:
    https://ibb.co/m8jD5Xp

    You can see the two hyperlinks below the table to link to the previous and next page. Search engines will be able to ollow thesew links and index your table. You just need to find a way to redesign these links properly.

    This URL jumps to page 7:
    https://wordpress.local/flat/pg/7/

    It does the same as your URL:
    https://example.com/data/7/

    This needs a little configuration. Once you got it working, search engines will index your whole table content. What do you think?

    Best regards,
    Peter

    Thread Starter siliconfold

    (@siliconfold)

    Ok I’ll check it out thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Page Numbers in URL’ is closed to new replies.