Hi @Tirithen:
Have you tried (which assumes your custom post type is 'animal'
and not 'animals'
):
$post = get_page_by_path('cat',OBJECT,'animal');
Related Posts:
- remove “index.php” from permalinks
- How does WordPress create URLs that Apache knows about?
- Stop WordPress appending `-2` to the end of my url after i change it
- Get default permalink structure from pretty URL’s
- Get current URL (permalink) without /page/{pagenum}/
- How to get pretty URLs with add_query_arg in permalinks
- Creating custom permalink structure for languages
- How to Check if a Page Exists by URL?
- Getting the Site URL Including the Front Base
- How to use relative links on my pages?
- WordPress Permalink changes to question mark (?) in URL
- Adding another word in front of post url
- How to prevent apostrophes and quotes from appearing in permalinks?
- Removing hierarchical pages in the permalink
- Update URL Snippet to Canonical Permalink URL
- why does anchor name add a slash to url?
- “.#[random-char-string]” being inserted at end of URLs
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- WordPress on a subdirectory of Laravel – WordPress pretty permalinks inner page shows laravel
- Pretty Permalinks
- How to create a permalink structure for posts in a specific category
- How to get url of a post from admin panel
- How to Remove Slug From Database?
- How to make draft posts or posts in review accessible via full url / slug?
- Remove subfolders from URL
- Limiting the number of words or characters in the slug/permalink
- flexible rewrite ‘ramble’ URLs with WordPress
- How to increase the character limit for post name of 200?
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Change website URL without breaking links or images? WP 3.3
- How to allow slashes in single posts when i click in the edit permalink button
- WordPress 3.4 Permalinks Redirection Problem
- Make attachment pages require a base url
- How to Remove -14 from WordPress URL (Permalink)
- How to Modify Existing Rewrite Rules?
- Using ‘Primary Category’ in URL
- display URL or permalink instead of page title in dashboard
- custom permalink/shortlink with base62 encoded post ID
- How can I get the permalink of a post before it is published?
- Add #primary at the end of navlink permalinks on single posts
- Why does one of my pages not have the option to edit the link?
- Using a template file for a specific custom URL
- Nested permalink without dummy parent page
- Giving specific category posts its own permalink structure returns 404
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- Extra url paths as variable
- Passing parameter through permalink structure
- How to add a ‘News’ section to specific posts in WordPress
- Custom Taxonomy rewrite rule causes 404 error on page or single post depending on if it’s set to “True” or “False”
- How to create a standard WP Page that has the same url as an archive
- Adding query string to multiple page urls in a WordPress function
- Post links broken after migration
- I have Akamai pointing to a WordPress installation with a different URL. Is there a way to make WordPress use this for link generation?
- Added a prefix in URL permalink structure but the old structure still working!
- Prevent Archive URLs
- rebuilding/ rewriting a url to make it SEO friendly
- How to change the URL using rewrite rule in wordpress
- Category URL to use same string as Post URL Permalink
- How do I generate formatted permalinks as specified in backend options?
- Get value from URL with different types of parameters
- a way to support totally different url structure
- add bar in paging in the URL
- WordPress Page URL
- Remove/hide a specify category-name from the url
- How to change URL of my pages?
- Post & Category Archives URL structure
- Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)
- How to change post template via url?
- Imported posts using wrong domain name
- When using number in url it is redircting to same page but when using character it redirects to 404
- Issues with WordPress permalinks
- How to display post permalinks instead of pages?
- Using a taxonomy value as part of a post URL
- Why is there a # and other characters in URL for WordPress site?
- Custom Permalink Base
- Update permalinks after domain change
- How to avoid duplicate Url for the home page
- Are custom page templates being used to get this permalink structure
- Change permalink in wp-property
- Include language variable in url
- Removing parent page in URL for one page
- How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?
- WordPress keep redirecting me to random URLs
- Default post type doesn’t display in url
- How to extract URLs from wordpress taxonomies
- Blog posts are not appearing as subs of Blog Page
- Remove parent product category slug from product_cat url woocommerce
- Standard Htaccess directives disappear by themselves
- How to add paraent in Blog post URL in wordpress
- Change default URL (or permalinks) in the back-end
- Modify Post URL Programmatically
- how to ensure url uses post_name and not query post id?
- Best way to approach creating a sitemap with unique URLS (No Permalink Changes)
- change the blog in the url if you go from a specific page wordpress
- How to Stop WordPress Change Slug Automatically Same as Title When Publish?
- Duplicate Content Issue with WordPress Permalink Structure and Primary Categories
- Get Page URl when changing slug and permalink
- Can’t Remove Unnecessary Slug
- WordPress homepage shows default theme after migration – logged-out users see different content
- After post URL change also automatically change references in posts to that new URL?