Lee Wallis
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: custom post type with post_id in permalink structureI put my reply in here, I finally worked it out:
Custom Post Type – PermalinksHopefully this helps.
Forum: Fixing WordPress
In reply to: Custom Post Type with Custom URLsOK so the below code has now worked for my problem above. Hopefully this helps for someone else ??
This is the option in the register_post_type
'rewrite' => array('slug' => 'post_type/%post_id%', 'with_front' => false)
And the code that worked for it
add_filter('post_type_link', 'post_type_link', 1, 3); function 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 != 'your_custom_post_type' ) { return $post_link; } //put post ID in place of %post_id% return str_replace('%post_id%', $post_id, $post_link); }
Forum: Fixing WordPress
In reply to: custom post type with post_id in permalink structureYep, I’m in the same boat!
I have posted a question about this and have been searching forums (including this one) for about a week now. It seems no one has any idea how to do it.
I thought it would be easy… until I started trying… hahaha. Hopefully a reply comes soon, and if it does on mine, i’ll post it in here as well.
You can use something like this:
<?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?>
Forum: Fixing WordPress
In reply to: Moving my blogCheck this link out, will probably help you out a bit.
Forum: Fixing WordPress
In reply to: Can't view my post when I log out of wordpressYou are the only one that cannot see it?
Forum: Fixing WordPress
In reply to: FixedInstead of just editing the post with ‘fixed’, if you could maybe write down what you did to fix it?
You never know, might help someone else at some stage ??
Forum: Fixing WordPress
In reply to: Can't view my post when I log out of wordpressIs it scheduled for a specific time or not published yet? Maybe it’s still a draft. Did you possibly make it a private post?
Forum: Everything else WordPress
In reply to: WordPress inside domain namesYeah report them. Only thing you can do really.
I think it is mainly an SEO thing having WordPress in the domain name. It will bring some great search results for them.
Forum: Fixing WordPress
In reply to: Domains and SubdomainsIf all you did what change those two options, then login to your admin and go back to your permalink page under settings, if you had these enabled, just visit the permalink page and click save again. That may help.
Forum: Fixing WordPress
In reply to: Custom Post Type with Custom URLsAnyone have any ideas at all? I’m willing to try anything ??
Forum: Everything else WordPress
In reply to: Custom Field Section Not Appearing In EditorEDIT:
Sorry! Double posted.Forum: Everything else WordPress
In reply to: Custom Field Section Not Appearing In EditorClick the ‘screen options’ up the top right, it might not be ‘checked’ to appear.
Forum: Fixing WordPress
In reply to: Moving blog to new directoryThe only thing I need to change when I transfer a blog to it’s real location is in phpMyAdmin (or whatever system you use for database stuff), you need to change 2 rows in the wp_options table, siteurl and home.
This should probably fix majority of the problem.