• 1-989-372-1168
  • info@resourcsintegrated.com

Category ArchiveWordPress Snippets

Fix Permalinks for Child WordPress Sites

Permalinks are important for many reasons, specifically SEO purposes. In addition, many quality plugins require the use of permalinks in order to work properly. Sometimes however, I have issues getting permalinks to work for various reasons. One of the main issues I run into is using a child WordPress site nested within another WordPress site. The main site generally has its own rules for link redirects and sometimes it messes up the permalinks associated with the child site which throws 404 errors on certain pages. I had a hard time finding the code to fix this on a Windows hosting server since most of the documentation covers Linux. However, I found the solution and thought I would share it in case you are running into the same issue.

In order to fix it, you have to access to the Windows hosting server files, particularly the web.config file on the main directory of the child site.

Open up the web.config file in a text editor such as Notepad and copy the following code into that file (be sure not to replace any existing code to avoid breaking the site):


<?xml version=”1.0″ encoding=:UTF-8″>
<remove name=”MainSite”/>
<rule name=”WordPress: https://YOURSITE.com” patternSyntax=”Wildcard”>
<match url=”*”/>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/>
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/>
<action type=”Rewrite” url=”index.php”/>

Basically, this code is telling the browser to ignore the main WordPress site and match the URL to the child site. By taking the main site out of the equation, we are able to get permalinks to work flawlessly.

Any questions or other suggestions, please comment below!

Customize Flamingo Inbound Messages and CSV Spreadsheet Export with the Post Title

Today’s topic is pulling the Post Title (_post_title) field from the Contact Form 7 plugin into the Flamingo table and also pulling it into the Export spreadsheet CSV file. I spent way too much time trying to figure this out and so I am sharing my discovery with the rest of the world in hopes that you may find this useful. The Contact Form 7 plugin is a great plugin but really should consider implementing this capability in future updates as it seems to be a common issue.

Download and install the following plugin:
Contact Form 7 Dynamic Text Extension

In the Form Tab of Contact Form 7, add the following code:

[dynamichidden your-subject “CF7_get_post_var key=’title'”]

If you also want to pull the URL of the post, you can also add the following code:

[dynamichidden page-url “CF7_URL”]

That’s it! Now the Subject and the URL should show up in the Flamingo Inbound Messages table and also when you export the CSV. Hope this helps! Comment below if you have any issues or suggestions.