Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20283, comment 1


Ignore:
Timestamp:
03/24/2012 09:53:40 AM (13 years ago)
Author:
egorpromo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20283, comment 1

    initial v1  
    11For single posts it is possible  to get canonical URL by used get_permalink() function or if we have paged post by used [http://core.trac.wordpress.org/ticket/16973 some function] that will be in future versions.
    22
    3 For any archive page there is no decision. It is possible to use get_pagenum_link() function in way like get_pagenum_link($wp_query->query_vars[ "paged" ]), but it is odd. If we have URL with unnecessary parameter like http://example.com/?cat=3&some_param=some_var (‘some_param’ is odd and unnecessary parameter) it makes parameter will be in every another page like http://example.com/?cat=3&some_param=some_var&page=2.
     3For any archive page there is no decision. It is possible to use get_pagenum_link() function in way like get_pagenum_link($wp_query->query_vars[ "paged" ]), but it is odd. If we have URL with unnecessary parameter like http://example.com/?cat=3&some_param=some_var (‘some_param’ is odd and unnecessary parameter) it makes parameter will be in every another page like http://example.com/?cat=3&some_param=some_var&paged=2 for example.
    44
    55Conclusion. Now we can retrieve canonical URL for single post (or single page or single attachment) only.