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
- Get default permalink structure from pretty URL’s
- 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
- How to prevent apostrophes and quotes from appearing in permalinks?
- Removing hierarchical pages in the permalink
- Update URL Snippet to Canonical Permalink 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 get url of a post from admin panel
- Remove subfolders from URL
- Limiting the number of words or characters in the slug/permalink
- flexible rewrite ‘ramble’ URLs with WordPress
- Make attachment pages require a base url
- How to Remove -14 from WordPress URL (Permalink)
- How to Modify Existing Rewrite Rules?
- 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?
- Change permalink rule if category is called “uncategorized”
- How to change the page break URL from ../post/2 to …/post/page2/
- Add a URL prefix to permalinks of News category and sub-categories of posts only
- Can two products with the same name but different category produce unique URLs?
- echo post-permalink without http and www
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- Get canonical link
- CSS not loaded when omitting www. part of URL
- Setting up two separate blogs while using WordPress as a CMS
- Custom permalink for search and pagination
- Get page by path – honoring permalink settings (urls w/slashes)
- Change blog segment of URL
- How to stop WordPress from removing & from URL?
- WordPress not opening posts with only numbers if permalink is post_name
- Non latin post slug truncate
- How to bulk edit image url in featured image and product description?
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Is there a link parameter that will show me all my published pages?
- How to include sub directory in sitemap? [closed]
- Get the url of a page template without using the page slug and ID
- Remove -2 from URL; no duplicate pages, no images, no pages in trash
- WordPress keeps giving me the wrong permalink
- Relative v.s. absolute URLs: which ones should I use for cross-domain portability?
- Permalink doesn’t get displayed in Twitter button (Local WordPress problem?)
- Permalinks settings
- mod-rewrite exception? keep #hash in matching urls?
- Edit permalink for certain pages
- Suddenly new posts have the default permalink instead of the post name
- Getting back a permalink from custom url
- Two URLs of one post is available
- Bulk append URL (add word to slug)
- Post is blank when I click on the link
- Access posts while mod_rewrite is broken
- Internal linking to posts permalink fail because of spaces and stripe at postname
- Can Permalink structure of %postname%/%post_id% improve performance
- Remove international characters from slug – Almost done – Bit help
- replicate url permalink after migrating to wordpress
- Can I change the URL structure for a CPT only?
- How do I structure my permalinks in WordPress?
- How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
- Can I show category name in url for only one of my categories?
- Make a post inaccessible without a unique ID in the URL
- Permalink Short code showing unnecessary link text inside the loop
- Customize URL for specific tags archive
- Multiple Taxonomy Items for Separate URLs
- URL gives 404 error of my subfolder site when i change permalink
- How to construct a dynamic rewrite rule for child pages that passes more than one query var
- 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?
- 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?
- Custom Taxonomy rewrite rule causes 404 error on page or single post depending on if it’s set to “True” or “False”
- 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
- Category URL to use same string as Post URL Permalink
- add bar in paging in the URL
- WordPress Page URL
- 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?
- Issues with WordPress permalinks
- How to display post permalinks instead of pages?
- Why is there a # and other characters in URL for WordPress site?
- 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
- Include language variable in url
- Removing parent page in URL for one page
- Remove parent product category slug from product_cat url woocommerce
- Standard Htaccess directives disappear by themselves
- Change default URL (or permalinks) in the back-end