I'm having a strange issue with one of my pages where in the backend I have a custom template selected but it's showing the single.php for the associated page.
The template worked absolutely fine before and when I changed the url of the page to something else, suddenly the template appears on the live site. But now I change the url back and it doesn't show again.
I've tried resetting permalinks and made sure that my htacess file has the right configuration but still no luck. Obviously it's not convenient to have to keep changing the page url! Any suggestions would be appreciated.
Related
I have a Wordpress website it started acting weird.
When ever any page from menu is clicked like domain.com/about-us it gets redirected to domain.com/?q=%2Fabout-us%2F and does not open page.
It stays on the same page.
a CURL -I returns this:
So i dont know where this redirect is setup.
I have tried changing permalinks to %postname%.
I also know permalink only affect posts not pages but not sure.
There's no redirection plugin either there.
I need someone to help me finding the issue.
Recently, when I view a page in Wordpress Preview mode, it always loads the default template (theme page.php file) whereas when I look at the published page, it's the right template. I have around 10 different templates for my pages. Just keep in mind that I'm not talking about the theme itself, but the Wordpress template structure. I included three pictures. The admin panel one, shows different templates for my page.As shown, I chose Fixed-Width Clean Page. The second picture shows the page in Preview mode.As you can see it includes a sidebar which is included in the default template but not the one that I chose. And the last picture is the Live view of the website which is correct. As you can see the sidebar doesn't exist. I searched all over the internet and did some suggestions, but none of them work (like saving the permalinks again, changing the theme and changing it back again, etc). The only change that I recently made was upgrading to Wordpress 4.7.4 and blocking access to admin panel by ip using .htaccess file (I removed the .htaccess file, but still no luck). Any suggestions would be appreciated.
OK, after some time I figured out what the problem was. The "WP Subtitle" plugin version 2.9, breaks the preview functionality if you have multiple templates. I report the issue to them as well, but posted the answer if somebody came across the same problem. In order to fix the issue temporarily, i commented out the below line (line 74) on the plugin's main file (wp-subtitle.php):
//add_filter( 'the_preview', array( 'WPSubtitle', 'the_preview' ), 10, 2 );
I have a wordpress website at http://www.wjewel.com/ . All the pages of the website are getting redirected to home page. There is no .htaccess file or web.config file for redirections. Can someone please guide me what could be the reason for this issue.
Resetting the permalinks within WordPress will resolve this issue.
To reset the permalinks for your WordPress installation:
Log into the WordPress Dashboard.
In the side panel, go to Settings > Permalinks.
Make note of the current setting. (If you are using a custom
structure, copy or save the custom structure somewhere.)
Select the Default option.
Click Save Changes.
Now select the previous setting you had before Default was selected.
Click Save Changes.
Redirection is done on client side. You have this meta tag in the html head.
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.wjewel.com">
(It has nothing to do with PHP headers)
I'd try to look for plugins injecting that meta tag or theme header.
Also just an observation - html body on /about/ page (for example) is empty.
I had this issue today and found that Yoast SEO have a permalinks setting which had two of my pages listed as redirect to home page.
I don't recall myself setting them up, but thankfully there was a button to delete those pages from that list.
Old question but I had the same issue and tried all solutions with no luck. Even deleting htaccess didn't work. I changed my settings to set latest posts as my homepage and then changed it to the desired page and that did the trick (at least for now)
fixed
I had a similar problem.
But only some selected pages were redirecting to home. And these pages which were redirecting worked on page no. permalink setting.
Tried everything as mentioned above, nothing worked.
I cleared my browser cache and it was all good again.
I'm building a custom theme, with a custom post type. If I want to use the WordPress pager in the back end - to navigate between pages of posts - the URL it directs me to is wrong and I don't know where to even begin.
So the dev url is set up as
http://socor.dev
when I want to go to page 2 of the pages the URL should be:
http://socor.dev/wp-admin/edit.php?post_type=page&paged=2
however the domain part of the URL is being stripped out and I'm left with:
/wp-admin/edit.php?post_type=page&paged=2
I noticed when looking through the front end code that this has been set:
<link id="wp-admin-canonical" rel="canonical"
href="http:///wp-admin/edit.php?post_type=page&paged=2">`
I am running the latest version of WordPress 4.5.1
In case anyone comes across this, I've managed to work out what was going wrong.
I had managed to overwrite my domain name somewhere. I used:
var_dump($_SERVER['HTTP_HOST']);
in my functions file to see what I had it set as.
It was weird because the admin area would load up fine in the first instance but would go through 404's and other errors when navigating through additional post pages.
I have following weird problem in Wordpress using permalinks.
When I use the default setting for permalinks, everything works just fine.
But I want to use the post name as permalink.
When using the post name, one link opens the home page instead of the actual page.
Manually changing the permalink in the page settings leads to a 404 Error.
I dont think this is the problem but the links form the pages have some similarites:
Home page: www.website.com/name1/
Site with problem: www.website.com/name1/index.php/name1/
What makes it even worse: when i set the parent of the page to home, everything works.
Changing the permalink manually to another string worked in the end.
Might be a bug from wordpress with same names.