I built a Wordpress site locally using MAMP, where I set up a page with a custom page template which displays a custom post type in a certain format. When I moved everything across to the live server, the custom page template doesn't work as I expected, and just shows what I assume is a default posts archive page (see example: http://www.hiblio.tv/rewind). What's weird is that if I set up a new page with a different permalink, it works fine (example: http://www.hiblio.tv/archive).
I've tried deleting both pages, removing them from the trash and starting again, but whatever I do, I can't get the page to display properly with the 'Rewind' url, which is where I need it to go. Any ideas?
Related
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'm migrating a website that has a custom CMS to Wordpress. We're talking about a giant site with thousands of posts.
At the moment I'm at the stage where I extract the content in JSON files by category and then insert them to the Wordpress DB via MySQL. I've even moved all the images and adjusted the URL using the PHP script.
However, my problem is with links inside the content. Some link to external sites (not a problem), while others link to other posts in the old site. How can I take those links and link to the correct, new Wordpress URL?
My link structure ideally would be /category/post/ in Wordpress. The old structure is similar, except the post URL is sometimes different by a few characters to the one coming out of Wordpress. It's not necessarily "post-title-is-the-url", sometimes it has a suffix like "_2". How do I go around the problem with the suffixes?
I'm in a bit of a pickle and I'm not sure how to get out of it. Not sure if this is a known Wordpress multisite bug or not or the way the multisite i am working on was setup. The kind of issue I am having is similar to this one http://www.feedmeastraycat.net/2011/10/04/wp-get_author_posts_url-in-mu-with-sub-directories/
By the way, I've just inherited this project and trying to 'unravel' the spaghetti.
The links created by get_author_posts_url() in theme functions file to generate the link for the author end up having an extra "/blog" in front of them and they should not have it there. Within the child sites, the get_author_posts_url() generated links are all ok and do not contain the "/blog" in the URL string.
Here is the website http://blogs.slq.qld.gov.au/.
When you click on an author link from the feature post tiles, you get an error 404 page returned. If you go into on of the child blogs - it does not happen.
Just trying to figure out a way to remove the "/blog" from the link string data generated by get_author_posts_url()
i.e. make http://blogs.slq.qld.gov.au/business-intelligence/blog/author/grailadmin/
BECOME....
http://blogs.slq.qld.gov.au/business-intelligence/author/grailadmin/
I have a Wordpress site that it is working perfectly with a bunch of posts and pages.
I have recently started a process to migrate the contents from another website and this has added ~16,000 pages and ~100,000 posts to the site.
Now, in the admin dashboard, when I go to the page list or I try to edit a page, it takes ages to load or stops loading because the timeout is fired. This is not happening with the posts, I can open the post list and edit any without issues. The frontend is working fine.
I'm starting to believe that Wordpress might not be able to manage that quantity of pages. Is there a solution to this? Replace Wordpress with another CMS like Drupal or Joomla is my latest option.
I also tried to tune mySQL, disable all the plugins (I only have a few), etc. with no luck at all.
Thank you in advance!
UPDATE:
I found out the reason of this slowness. When editing a page, Wordpress displays a dropdown list to select a parent page. This list is populated with every single page available on the site (ugh) and this is causing the huge load times. If I "tell" Wordpress to not show this dropdown list (via functions.php or editing the core), everything goes back to normal.
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.