Unanswered Questions
614 questions with no answers
4
votes
0
answers
2k
views
get_permalink returns default link
I hope you can help me.
So I'm using /%postname%/ as permalink structure, and my htaccess looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /develop/...
4
votes
0
answers
194
views
permalinks with get variables
I'm trying to create my own permalinks with wordpress rewrite API. I have been registering my get variables as it follows
add_filter( 'query_vars','driver_vars' );
function driver_vars( $vars ) {
...
3
votes
0
answers
90
views
Child post with numeric only slug keeps redirecting to parent
I modified the allow-numeric-stubs plugin code to work with CPTs. You can view my forked repository here: https://github.com/akshatkedia/allow-numeric-stubs
WordPress is now allowing numeric slugs for ...
3
votes
0
answers
875
views
Using 'Primary Category' in URL
I'm running into an issue where I want to set up categories in my URL (%category%/%postname%), but doing this will create multiple URLs for the same content if I select multiple categories.
So, for ...
3
votes
0
answers
2k
views
Add parent/child taxonomy to custom post type url
I have seen several cases of one taxonomy being added to a custom post type url, but I have modified that function to include a parent and a child taxonomy term. However, I am getting a 404 when I go ...
3
votes
0
answers
259
views
rewrite_rule for custom post type doesn't affect get_permalink
I have a custom post type named course. I added rewrite rules so I can include post_meta data in the URL.
/* Rewrite URLs for generate dynamic template */
add_filter( 'generate_rewrite_rules', '...
3
votes
0
answers
190
views
Add 'articles' prefix before blog posts url without affecting pagination
I tried this solution for adding 'articles' prefix before blog posts on URL.
function filter_post_link($permalink, $post) {
if ($post->post_type != 'post')
return $permalink;
return '...
3
votes
0
answers
2k
views
Attachment page 404 not found when image is attached to post
I have this new WP webiste I’m working on. Today I was going to design the attachment.php page so that my image pages would look nice, but found that I was getting a 404 for all of them actually. I’ve ...
3
votes
0
answers
660
views
Custom Post Type relationship with hierarchical parent and child permalinks
Trying to get my permalink and url structures to behave nicely.
I have a Custom Post Type called Diseases.
This post type is hierarchical with parent and child relationships.
I have another CPT ...
3
votes
0
answers
61
views
How to show custom taxonomy in the permalink?
I used the Portfolio Post Type Plugin to create custom tax and post type.
I would like to show the custom taxonomy on the portfolio projects.
portfolio/customtaxonomy/project
while now is
...
3
votes
0
answers
284
views
Make Category Base Appear in Posts Permalink (but not tags)
I have a slight problem with WP permalink structure.
My aim is to make posts permalink appear with a specific category and it's base, for example:
domain.com/custom-base/%category%/%postname%
And ...
3
votes
0
answers
328
views
Possible to use /%monthname%/ in my permalink structure without using a plugin?
I need to use the following permalink structure so that when I launch the website, the urls will be the same as they were before (moving from a non-wordpress site):
/blog/posts/%year%/%monthname%/%...
3
votes
0
answers
190
views
Stop redirecting to posts not in a category / duplicate slugs
I have multiple posts with the same title, e.g.
/states/new-york
/cities/new-york
/counties/new-york
but Wordpress doesn't allow duplicate slugs, so they appear like:
/states/new-york
/cities/new-...
3
votes
0
answers
427
views
Post in Multiple Categories to stay in current category (permalink, next previous post link)
I guess this has been mentioned before, but after 2 days of browsing i haven't find a complete solution. Maybe someone has come across this problem before?
I'm building a designer portfolio where ...
2
votes
0
answers
59
views
@wordpress/env cli doesn't seem to properly update permalink structure until visiting the WP Admin Permalink settings page
I'm using https://www.npmjs.com/package/@wordpress/env to set up a local docker-based WordPress development environment, which has been working great so far. I'm trying to build a script using ...