You never initialize the value in $url
. Test the value in $swapcategory
. When there is no match, $url
is empty and that may be the problem. This comment is false:
// $url now contains our new success page. Let's update the form setting.
It should say:
// $url may contain our new success page or it may be unset.
Related Posts:
- exclude category from WordPress Form function
- Ninja form Redirect depending on text field content [closed]
- Default URL for category dropdown select option
- Get rid of WordPress category, tag and author archives?
- Best Way to Redirect Category to Page and Hide Category
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Preventing index.php?category_name=something from redirecting
- How to add the category ID to admin page
- Add forward slash on categories url (serve one version of a url)
- Multisite blog converting categories to subdomains
- Optimal way to redirect home page to category archive?
- Redirecting specific category posts to subdomain
- How to create a widgetized sidebar for every category dynamically?
- Saving two categories from two dropdowns in front end posting form
- Only show category to certain user levels without plugin
- How to: 301 Redirect /category/ to /customname/
- How to? Redirect /category/sci-fi/ to /category/scifi/?
- List Categories of the Parent Category of the Current Category
- Redirecting category link to first child post
- wp_list_categories, Add class to all list items with children
- Remove “Parent” Selection When Adding/Editing Categories?
- Check is category parent or not from its ID
- Redirect category to first available child post
- How to retain the values from dropdown category lists after wrong form submission?
- How to show in search results posts with a particular tag in a particular category?
- How can I get an tag to wrap each ancestor that gets outputted in this condition?
- If category is in parent category?
- If in category to be inside of a function
- Rename Default Category (Uncategorized) Via a Function
- Check child/parent categories if exists
- Redirect category to url with /category
- Changing permalink from /postname/ to category/postname/
- Getting URL of archive (category) page
- How to show only one category in breadcrumb navigation
- Additional form options based on category selected not working
- Query posts from category based on a filter most favorited
- WordPress category page redirects in .htaccess not working
- Why do my categories redirect?
- WP didn’t redirect to canonical category URL
- Sub Categories Keep Redirecting to Pages With Same Slugs
- redirecting from a general category page to another specific one
- Add tag parameter to category.php
- Random Featured Image Based on Category
- Redirect single article permalink to paginated category page
- Automatically redirect a page to a category that share the same slug
- add slug beside name in Admin Category Checklists
- Change div background acording to the selected category
- WordPress link to post links to category (loop)
- Contact Form 7 If Condition
- How to use wp_list_categories with plugin category?
- How to display post in custom file not in archive file?
- Use blog as base for tags and categories
- Search form options group categories
- Category link redirect to custom template page instead of index.php?
- How to add icon over specific thumb
- How to load several hierarchical categories from functions.php
- Change Default Content when Creating a Post based on Previous Category Choice
- How to add a custom thumbnail size for a specific category?
- Need help with major category and permalink re-organization
- Exclude category from drop down list form
- create function to call category name and slug
- Redirect Problems with Archive Page and GET variables
- Different size video display for category page (smaller) & detail page (larger)
- OK to redirect the root WordPress category slug?
- How to prevent WordPress from redirecting single page to prefixed category archive with same name?
- Category pages redirecting to tab on Posts page grid
- Postback redirect through add_action is not triggered
- WordPress Category url redirects to subdomain
- wp_category_checklist won’t show up for non-admin users
- Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/
- Code to display category-specific single.php is overriding normal single.php, too
- Paginations in Category Page Leads to Sample Pages
- Loop Through Categories in Custom Field
- htaccess redirect for all categories converted to tags now showing 404
- Function to list posts from current post’s category fails in WP 3.8
- Page redirecting to category (IE only)
- Ajax call activate after submit in edit-tags.php page
- Show only one category in main query, issues on tag page
- Categories as selectable links on submission form
- Show parent-child relationship for categories in the wordpress admin
- Category Redirection Problem
- How would I increase the Author Role to be able to add a new category?
- what is the meaning of settings_fields()
- Custom Query to search through categories
- Get sticky post from category?
- Random taxonomy category list
- Admin: Navigation Menus do not show empty categories/taxonomies in the list’s search tab
- getting post data in functions.php
- Remove the number of posts displayed in wp_list_categories()
- “Virtual category page” based on a custom field filter
- Different header for each category
- sidebar troubles, taxonomy trouble
- Code for Category, Tags, Archive URLs
- How to create Child Category page from scratch at wordpress?
- Notice: Undefined variable
- How to insert category to post via php?
- Show Subcategory Name Instead of Parent Category
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- Custom built theme won’t filter categories
- get IDs from links categories