Generate custom RSS from a plugin
Well, that was sutpid of me not to have seen this, but I just have to follow the tutorial and not use get_template_parts()! Moving on.
Well, that was sutpid of me not to have seen this, but I just have to follow the tutorial and not use get_template_parts()! Moving on.
Solved it for different edit pages for different roles. In my method resposible for rendering the field I have: if ( count( array_intersect( $allowed_editors, $user->roles ) ) < 1 ) $readonly = ‘readonly’; Which I later use to either set the input field as readonly or add/remove classes before rendering it. Still working for the … Read more
Prevent repetitive terms in get_the_term_list
Paginating custom query on category template
Use add_rewrite_rule() function custom_rewrite_rule() { add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’index.php?page_id=12&food=$matches[1]&variety=$matches[2]’,’top’); } add_action(‘init’, ‘custom_rewrite_rule’, 10, 0); you can use if ( ‘myposttype’ == $post->post_type ){} to make it post type specific. Weather you want to add it inside the function or wrapping the add action is up to you.
Turns out custom post type archieve files for CPTs like adventure, were still in my system (thanks to Dropbox messing up the file sync). So, this is why I was still seeing some of the template names listed in Page Attributes. Lesson learned for anyone going through the same issue: always make sure the files … Read more
404 error Custom search results page for custom post types with friendly URL
For reference of other I’ve managed to get help with this with help from wordpress support forums. You can specify a second parameter in get_terms to exclude specific term IDs: $term_args = array( ‘exclude’ => array(5, 8) ); $custom_terms = get_terms(‘service_categories’, $term_args); In the case above, we’re excluding terms with ID 5 and 8. Reference: … Read more
You should call your file taxonomy-interview_category.php to be automatically associated with your custom taxonomy. If you want it to look like interview archive, you can just include archive-interview.php in your newly created taxonomy-interview_category.php. I suggest you have a look at this image that explains WordPress template hierarchy and logic: http://codex.wordpress.org/images/9/96/wp-template-hierarchy.jpg
Each video can have different aspet ratio, that is totally normal. Normally, the theme set a global $contnt_width to set the max width for embeded content and the height is auto. For exampl: if ( ! isset( $content_width ) ) { $content_width = 700; } If you need to set a specific width and height … Read more