Forum Replies Created
-
AuthorPosts
-
April 28, 2023 at 5:27 pm in reply to: Problem about rel next/ previous in pagination – not quite fixed #1405949
This didn’t work. It works for all but first and last pages when I put:
$url = (isset($_SERVER[‘HTTPS’]) ? “hhttps” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
$link_prev = $url . ‘age/’ . ($page – 1);
$link_next = $url . ‘age/’ . ($page + 1);if( ! $page ) {
$output .= ‘ <link rel=”next” href=”‘. $link_next .'” />’ . PHP_EOL;
} elseif( $page == $wp_query->max_num_pages ) {
$output = ‘ <link rel=”prev” href=”‘. $link_prev .'” />’ . PHP_EOL;
} else {
$output = ‘ <link rel=”prev” href=”‘. $link_prev .'” />’ . PHP_EOL;
$output .= ‘ <link rel=”next” href=”‘. $link_next .'” />’ . PHP_EOL;
}echo $output;
}April 28, 2023 at 5:25 pm in reply to: Problem about rel next/ previous in pagination – not quite fixed #1405947This reply has been marked as private.April 28, 2023 at 4:13 am in reply to: Problem about rel next/ previous in pagination – not quite fixed #1405895This is the code I need to debug:
add_action(‘wp_head’, ‘wp_head_pagination_mod’);
function wp_head_pagination_mod() {
global $wp_query;$page = get_query_var( ‘paged’ ) ? get_query_var( ‘paged’ ) : get_query_var( ‘page’ );
$page = ! $page ? 0 : $page;$url = (isset($_SERVER[‘HTTPS’]) ? “https” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
$url = substr($url, 1, strpos($url, “page”));$link_prev = $url . ‘page/’ . ($page – 1);
$link_next = $url . ‘page/’ . ($page + 1);if( ! $page ) {
$output .= ‘ <link rel=”next” href=”‘. $link_next .'” />’ . PHP_EOL;
} elseif( $page == $wp_query->max_num_pages ) {
$output = ‘ <link rel=”prev” href=”‘. $link_prev .'” />’ . PHP_EOL;
} else {
$output = ‘ <link rel=”prev” href=”‘. $link_prev .'” />’ . PHP_EOL;
$output .= ‘ <link rel=”next” href=”‘. $link_next .'” />’ . PHP_EOL;
}echo $output;
}It is resulting in <link rel=”next” href=”ttps://mylinkhere/blog/ppage/3″ />
How can I get it to show https and take out the extra “p” in pages?
@ISMAEL are you available to assist?Thank you for the suggestions. The RocketWP plugin is actually fixing the problem, not causing it. I removed it from staging and now the site issue shows when logged both in or out.
I tried all combinations of file compression under Enfold > Performance but it does not fix the issue.
Apologies, I forgot we had a login page redirection for the site. The standard login URL should work now.
There are a few things happening here:
1. When viewing the staging site after the update while logged into admin, the child theme styling is being overwritten by the parent theme. Here are a few examples:
Staging – https://www.dropbox.com/s/2ta19rgzmqiw7bk/2023-02-17_12-59-11.jpg?dl=0
How it should look – https://www.dropbox.com/s/f2cwozlwise9bs7/2023-02-17_12-59-23.jpg?dl=0Staging – https://www.dropbox.com/s/kkb3pvia78t9nsp/2023-02-17_12-58-50.jpg?dl=0
How it should look – https://www.dropbox.com/s/kju9irtjd8elolv/2023-02-17_12-59-34.jpg?dl=02. When not logged into admin, the staging site shows that styling correctly, but is missing part of the homepage:
Logged out staging – https://www.dropbox.com/s/yluvdf1qvxjdqif/2023-02-17_13-00-24.jpg?dl=0
How it should look – https://www.dropbox.com/s/q0fddi4ez1uxt23/2023-02-17_13-00-08.jpg?dl=03. The Theme Options page appearing as a blank page turned out to be an incompatibility with the EWWW plugin.
I hope this helps.
Sorry, there was a spelling error! It’s https://jobpoststaffing.org/
Yes, for example, CSS associated with the class .yellow-box (in the child stylesheet) on the front page has padding that is being overwritten by the parent theme when it wasn’t before the theme update. If you want a comparison, the production site (jobpostatffing.org) has the correct styling. I have provided admin credentials for the staging site in the private box.
-
AuthorPosts