markgia
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 500 Internal Error FixThis solution sometimes works for me:
1. Change permalink settings to default
2. View page*
3. Revert permalink setting to however it was before*Optional step, but I do it to make sure I haven’t accidentally made a programming error, such as an infinite loop
Forum: Fixing WordPress
In reply to: Permalink issue with custom post types/%post_id%/%postname%/ results in 404. Any ideas what I can do?
Forum: Fixing WordPress
In reply to: Permalink issue with custom post typesThanks for the reply Roy! Good to know its not just an isolated case.
I’ll go down your route and try and modify the permalink with some hooks/filters.
Forum: Fixing WordPress
In reply to: Switching DomainsNo problem David.
Have you transferred your site over to your .com domain or is it still sitting on your byehost account?
If your site has been transferred to your new domain then nothing should be on your old domain. It would be safe to edit the existing index.php on your byehost.com site. Before you do this can you confirm that the site is fully functioning on your new domain?
Forum: Fixing WordPress
In reply to: Switching DomainsCreate an index.php with the following code:
<?php header("Location: http://www.yoursite.com/"); /* Redirect browser */ exit; ?>And upload to your byehost.com root folder.
Forum: Fixing WordPress
In reply to: How to add filter on posts retrieved from WP_Query object?get_menu_items_by_coursereturns an array of posts and I would like to use an add_filter function on each of these posts before they are displayed on screen. If you are in the loop then you could use ‘the_content’ hook however I’m creating a custom loop so I cannot use this hook.Forum: Themes and Templates
In reply to: custom post types – not found (or infinite loop)Its so plain to see now! I was limiting
register_post_type();to the admin dashboard and of course the template has to have access to the arguments as well to display it correctly!Oh things were so much simpler in C++ (never thought I’d ever say that)
Forum: Themes and Templates
In reply to: custom post types – not found (or infinite loop)Thanks Dion,
I followed your advice but I think my problem lies elsewhere.
I have two plugin files – main.php and admin.php
main.php includes admin.php when
is_admin() == trueand I callregister_post_type();inside admin.phpMy custom post type would work when I leave the
$rewriteargument undeclared but assume I defined'slug' => food_itemsthe post would not be found. I tried changing permalink settings and callingflush_rewrite_rules();but no luck.Eventually I placed the code in functions.php and hey presto! Everything worked as you would expect. Even changing the
slugargument in$rewritearray worked everytime without having to mess with permalink settings.Rapidz are you declaring custom post types in your plugin? If so I would suggest moving the code over to a single file if you haven’t done so already.
Does anybody have any insight in to why custom post types aren’t working when I create them in include files?
Forum: Themes and Templates
In reply to: custom post types – not found (or infinite loop)I’m having the exact same problem. I’m creating a plugin which requires a custom post type. The admin side of things is perfect but posts aren’t showing. Even when I preview before publishing posts are not displayed.
Have you managed to resolve this problem rapidz?