tiptap
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: add_rewrite_rule causing redirection problemOk I managed to solve it.
It seemed the place I was added the rewrite rule kept getting removed. so I moved it to the INIT hook and all seems fine.
Also it seemed to be caching a lot of the pages so I cleared that also and is now fine.
I noticed it the rewrite was getting removed by installing the ‘Monkeyman Rewrite Analyzer’ plugin which lists all of them.
Forum: Fixing WordPress
In reply to: 404 — Fancy meeting you hereI get the go daddy holding page come up.
Which normally means your domain hasn’t propagated / setup on their system yet
Forum: Fixing WordPress
In reply to: 404 — Fancy meeting you hereI don’t know the response theme, but do you need to set the homepage up in settings?
ie in the dashboard go to settings->reading and choose the static page you want your homepage to be
Forum: Fixing WordPress
In reply to: URL structure for CPT's same as postsI think I’m almost there with this now.
I’ve managed to get the post_id into the url of the custom post types post.
ie mydomain.com/custom-post-type/post_id/post-name/
add_filter('post_type_link', 'my_post_type_link', 1, 3); function my_post_type_link( $post_link, $post = 0, $leavename = false ) { if ( strpos('%post_id%', $post_link) === 'false' ) { return $post_link; } if ( is_object($post) ) { $post_id = $post->ID; } else { $post_id = $post; $post = get_post($post_id); } if ( !is_object($post) || $post->post_type != 'features' ) { return $post_link; } //put post ID in place of %post_id% return str_replace('%post_id%', $post_id, $post_link); }
Then in the bit where I setup the post type, i add the following to the slug
'slug' => '/feature/%post_id%',
So all i need to do now I think is write a rewrite to remove the /feature part and it should work ‘hopefully’, but no luck with that yet
Forum: Fixing WordPress
In reply to: What is the Custom Post Type template?Ok I think I have solved it – if there is a better way let me know;
When registering the post-type i set ‘has_archives’ => true
then created the template archive-awards.php
Now I get the correct template being called for ‘/awards/’
Forum: Fixing WordPress
In reply to: different template depending on domain / urlah ok, yer that sounds good.
however id want to manage all of them from domain a
so id log into domain a’s wp-admin, update and add bits and bobs, which appears on all the sites
Forum: Fixing WordPress
In reply to: Walking up Custom Taxonomy hierarchygreat ill give those a shot thanks!