Harryson
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anythingOk, took plugin check little bit further..
I figured out that the
get_pages()was because of this plugin: http://wordpress.org/extend/plugins/exclude-pages/And the [gallery]‘s source functions, that basically get children was bugged because:
http://wordpress.org/extend/plugins/post-types-order/I wish the opposite of all the best to the authors of these plugins and hope, they will someday learn the essence of correct programming.
The purpose of this plugin is clear and needed.
However, it is bugged as it bugs out the child_of parameter inside
get_pages().I do not recommend this plugin to anyone!
Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anythingProblem is much more deeper, then first though. It turns out, that
get_children()or anything withchild_ofin it doesn’t work.So for instance, if we have known page-id, that has child-pages aka. subpages, and that page-id is 410:
$pages = get_pages('child_of=410'); print_r($pages);Or any other possible querying method, DOESN’T WORK.
This definitely isn’t theme-related. So what is it? Possible, that wordpress core is buggy?
Forum: Fixing WordPress
In reply to: How to add filter to __() and _e() ?Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anythingSo basically, if I cannot retrieve the posts attachments then no surprise, that
[gallery]doesn’t work. Also, no surprise in the fact, how useless this forum really is on giving support 🙂Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anything$arrImages = get_children('post_parent=' . $post->ID); print_r($arrImages);Does not return anything, what could be the problem?
Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anythingIs there a function, that can retrieve all the posts attachments? So I could create my own shortcode…
Forum: Fixing WordPress
In reply to: How to make your own catalog?In a nutshell:
1. Create custom post type and custom taxonomy “categories”
2. Create a page called “the list page” and put in the content [the_list]
3. Create a custom shortcode, that displays the list with categoriesThanks for your help!
Forum: Fixing WordPress
In reply to: Search doesnt search all the custom post typesOk, totally my bad. My search.php had only one post-type set, so after changing to:
global $wp_query; $args = array_merge( $wp_query->query, array( 'post_type' => array('post', 'page', 'allfilmteam', 'allfilmnews', 'allfilmcommercials', 'allfilmfilms'), 'posts_per_page' => 5, 'paged' => get_query_var('paged') ) ); query_posts( $args );Everything was solved.
Forum: Fixing WordPress
In reply to: Search doesnt search all the custom post typesSo I found this article:
http://new2wp.com/noob/wordpress-search-custom-post-types/and tried out this:
// Define what post types to search function searchAll( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array( 'post', 'page', 'feed', 'allfilmteam', 'allfilmnews', 'allfilmcommercials', 'allfilmfilms' )); } return $query; } // The hook needed to search ALL content add_filter( 'the_search_query', 'searchAll' );It didn’t work of course.
Forum: Fixing WordPress
In reply to: Search doesnt search all the custom post typesInstalled the “Search everything plugin” and it didn’t change anything. It still doesn’t search some of the post-types.
Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anything1. Cannot deactivate all plugins, as they are hooked to my site.
2. Cannot switch to standard theme, as it has been deleted
3. No inactive or “dead” plugins.How can this be affected by my custom theme? I didnt find any evidence, that the [gallery] is hooked to themeing in any way.
Forum: Fixing WordPress
In reply to: [gallery] shortcode not displaying anythingWhen I try to bypass this problem by creating my own shortcode to display the gallery. I use
get_children()that doesn’t return anything at all. So is there some trick, maybe when registering your custom post type related to post attachments?Forum: Fixing WordPress
In reply to: How to get custom post type's all custom taxonomies in an array?$terms = get_terms($taxonomy = 'mytaxonomy'); foreach ($terms as $term) { echo '<li><a href="' . get_term_link($term->slug, $taxonomy) . '">' . $term->name . '</a></li>'; }My overall solution was, that the custom taxonomy slug was simply: “news/category” and indeed the template-name for custom taxonomy would be taxonomy-news_category.php Works 100% like I wanted.