How to Prevent Wordpress From Overriding Links in Posts when Using Wordpress Rest API - wordpress

I am loading posts from a WordPress site using the WordPress REST API. The Domain that the WordPress instance is running on is totally different from the site where the post content is being displayed.
There are links in the posts that link to other posts on the site.
These links are somehow manipulated/generated and are referencing the WordPress host domain, not the domain where they are being displayed, which is causing these links to breaking.
I have tried overriding these links addresses directly in the posts table by doing a regex search, but when I save this, WordPress auto-magically overrides the URL again.
How do I disable this link override feature so that I can just specify what the URL should be without WordPress interfering?

Related

magento fishpig wordpress integration - block view of non-magento blog site

I've gotten the 4.3.08 fishpig extension working with my 1.7 Magento site (yes, I know it's a very old magento version). The integrated blog looks great and has the magento theme when I access it via the Site Address URL. However, I can still access the non-integrated blog when I type the Wordpress URL into a browser. That url doesn't have the integrated theme - it's just the plain posts. I don't want google to index that wordpress url or for users to find that url. I want them to only see the Site Address URL. I have done a ton of searches but can't seem to find how to do this. Looking for help!
You haven't included your URL so I can't provide accurate feedback. That being said, if configured correctly, the WordPress URL should give a 404 error page. This won't be seen by anyone and won't be indexed by search engines.
If the WordPress URL is visible and everything is configured correctly, you may be using the default permalinks (eg. /blog/?p=123). Change the Permalink structure at Settings > Permalinks and the WordPress URL should generate a 404 page.

How to implement wordpress blog and magento blog parallely

I have a single instance of Magento running. I am using wordpress blog in magento and want to use magento "Blog" parallely. When i use both blogs magento blog overrides wordpress blog section. Can anyone tell me how we can solve this problem.
You can see the link http://dev.dynatrac.org/ where i want to use this section.
Thanks
Instead of using URL http://dev.dynatrac.org/index.php/blog.html, you can use http://dev.dynatrac.org/blog/ and put the wordpress installation in the blog directory of your magento root.
Now using .htaccess or nginx conf (depending upon whether you use apache or nginx) you can redirect the URLs in the form of http://dev.dynatrac.org/blog/something_something.html to blog/ directory.
Unfortunately, the AW_Blog extension uses 'blog' as it's router frontName. This overrides the Magento WordPress Integration extension, making the 2 incompatible. In an ideal world, AheadWorks would modify their extension to use a different router frontName (eg. aw_blog) and then would display the blog using a dynamic route (in the same way that Magento WordPress Integration does), thus allowing both extensions to function at the same time.
My advice would be to remove AW_Blog and instead, make use of the Custom Post Types add-on and Root.
The Custom Post Types add-on allows you to create custom post types in WordPress and display them on your Magento integrated blog. As an example, lets say you display your standard blog posts at /blog/ but wanted to create a different type of posts (eg. News articles). You could setup a custom post type called 'news'. By default, this would display all of your news posts at /blog/news/. To improve this, you could install Root, which would remove the /blog/ from the URL, meaning your news articles would be available at /news/.
This method allows you to create what appears to be multiple different blogs but is actually a single WordPress blog that makes use of different custom post types. This method will allow you to have as many different post types as you require.
EG.
http://www.yourmagento.com/blog/
http://www.yourmagento.com/news/
http://www.yourmagento.com/recipes/
http://www.yourmagento.com/tutorials/
All of these would be powered from 1 WordPress installation and integrated into Magento.

Wordpress landing.php page: access my plugin then redirect

I need to create a static php landing page (landing.php) for inbound advertiser links that that can access my wp plugin and then redirect to homepage.
Is it possible to access my plugin from a "regular" .php file? If so, how?
Or is there better way to do this within WP that doesn't load templates and just accesses my wp plugin and redirects to homepage?
Put this line at the top of your landing php:
require('/path/to/wp-load.php');
After that, you can use all WordPress functions, including your plugin.

Wordpress url and folder structure

I'm working on migrating a static site to a new one based on Wordpress as a work platform.
The old site contains static html pages and a separate folder for the blog.
As a result I get the following URLs www.mysite.com / blog / category-name / post-number-one.
On the new site, WordPress turns the URL into www.mysite.com / category-name / post-number-one, removing the blog/ part.
For the sake of SEO, I must keep these urls like the old site. Is there a way using Wordpress to maintain this structure for blog posts only?
Yes, in the Wordpress admin, go to the Settings Tab, then the Permalinks menu. There will be a section called "Category base". Add "blog" there.
That should make it so the blog the categories are prefixed with /blog/category-name/post-number-one.
I had a similar issue. Basically I was running two Wordpress installations. One for pages and one for blog. Long story behind that.
But I eventually I needed to merge the WP installations.
In my case I also needed to go to Settings -> Reading and set the Posts page to "Blog", which was an empty page I named Blog also. This made it so the blog would be viewed at http://mydomain/blog/. I'm not sure if you wanted that too.
But yeah for the categories, you just need to add "Category base" under the permalinks setting.
in your general settings, you can set a subfolder as your url, which can be hard to debug when you have problems, in my experience.
the other is that if you go into your clean urls settings page, you probably can simply add a string before your other %params%

Wordpress upload from localhost to server

I uploaded my wordpress site from my Local host to a folder off my main domain (http://example.com/folder) using this tutorial http://www.webdesignerwall.com/tutorials/exporting-and-importing-wordpress/
(im working on a mac)
Everything went ok - admin panel is fine homepage is fine etc - only any page apart from the homepage redirects to this (http://example.com/folder/pagename) except instead of showing the content from that page it shows the unstyled information from the index page of my main root (http://example.com/)
What can I do to get this working?
Thanks
Do a general search with phpMyAdmin in your database for localhost URLs. And see How to Find and Replace Text in WordPress MySQL Database using SQL When Changing Domains » My Digital Life and Search RegEx « WordPress Plugins for grepping through posts and pages.
Better yet, use interconnectit.com WordPress Serialized PHP Search Replace Tool
And check your theme files for hardcoded links (as opposed to links using Template Tags/bloginfo « WordPress Codex
) to style sheets and pages.
Reset permalinks in Dashboard/Settings/Permalinks.
Check:
wp-admin > Settings > Wordpress address and Blog address
to include "folder"
to get this working ... delete all the posts/pages - go to ur local wordpress blog and export it.
login to ur web blog and import.
that would be an alternative solution to working with the database and as far as i know exporting/importing content works good in wp :)

Resources