Opened 10 years ago
Closed 5 weeks ago
#40014 closed defect (bug) (worksforme)
& converted to '#038
| Reported by: | fervillz | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 4.7.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Hi guys,
This is a follow-up to #30831.
Using WordPress v4.7.2 . With paginate_links() and setting the 'add_args' to an an array of values breaks the url. Specifically replaces & with #038;
Sample code below:
echo paginate_links(
array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $query_object->max_num_pages,
'format' => 'page/%#%',
'add_args' => array( 'project' => 1 /* or whatever the project number is*/ ),
) );
The code above replaces & with #038;
Sample result: http://domain.com/?page_id=1&paged=2#038project=1
Attachments (1)
Change History (5)
#2
@
10 years ago
Hi @subrataemfluence,
Hmm. Can you try to modify your Permalink settings to the default 'Plain' .
#4
@
5 weeks ago
- Milestone Awaiting Review
- Resolution → worksforme
- Status new → closed
I also tested this and want to first thank you for the initial report but in testing today I can't replicate it. For now, I am going to close this. It can always be reopened though if this is something should still be an issue.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Yes, the link you provided does change
&to#038but for me it did not happen. I am using the similar code:URLs still come up as
http://local.tourplanner.com/page/2?place=1&type=4.Browser: Chrome
WP Version: 4.7.2
Theme: Custom (no child theme)
Two differences between yours and mine are:
Screenshot attached. Neither Status bar nor the Address bar has converted
&to#038.