dskbrk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Gallery Shortcode renders different code in RSS2 feedin wp-includes/media.php, function gallery_shortcode(), line 811, there’s:
if ( is_feed() ) { $output = "\n"; foreach ( $attachments as $att_id => $attachment ) $output .= wp_get_attachment_link($att_id, $size, true) . "\n"; return $output; }I solved copying the whole function without those lines in my theme functions.php with a different name, then adding:
add_shortcode('gallery', 'gallery_shortcode_fix');I dumped the database and did a find & replace for the new domain.
I also tried the Export feature but it said: The uploaded file is not in the correct format.
However, recreating the custom post types in the admin menu solved the issue.
Forum: Networking WordPress
In reply to: Canonical urls for pages on main site are brokensorted out setting the domain name with www.:
define( 'DOMAIN_CURRENT_SITE', 'www.domain.xxx' ); // it was without www.in wp-config.php. Now everything is working fine.
Forum: Networking WordPress
In reply to: query loop from other siteHouston, we have a problem…
I switched the blog but I don’t know why in the loop, when I try to get my custom taxonomy, I get a WP_Error object:
global $switched; switch_to_blog(2); global $post; $myposts = get_posts('post_type=custompost'); if ($myposts) { foreach ($myposts as $post) { setup_postdata($post); $myterms = get_the_terms( $post->ID, 'customtax'); // <- returns a WP_Error Object: Invalid Taxonomy ... } } restore_current_blog();Any advice?
Forum: Networking WordPress
In reply to: query loop from other sitecool!!
I’ll give it a try right now!
thanks a lot!
Forum: Fixing WordPress
In reply to: Custom Post type admin UI with custom taxonomieswell, I found that adding the custom taxonomy in the edit panel url (&customtax=term) WordPress actually filter the results, so for adding filter functionalities, in the snippet above for example, is as simple as that:
function voodoo_prod_custom_columns( $column ) { global $post; switch( $column ) { case "customtaxonomy": $terms = get_the_terms( $post->ID, 'customtaxonomy'); if ($terms) { foreach ($terms as $term => $myterm) { echo '<a href="'.get_bloginfo('url').'/wp-admin/edit.php?post_type=customtype&customtaxonomy='.$myterm->slug.'">'.$myterm->slug.'</a>'; } } break; //etc... } }now links filter posts by the custom taxonomy term π
Forum: Fixing WordPress
In reply to: Custom Post type admin UI with custom taxonomieshey Rev. Voodoo,
this is a great start! your snippet works very well.
Now I’m going to look if there are also any hooks for the filter funcionalities (ex: show only posts with that term…).
Thank you so much.
Forum: Fixing WordPress
In reply to: WordPress MultiSite and custom wp-contentJust an update: I leaved the custom wp-content dir and till now everything seems to be ok. Network sites are configured to be in sub-folders. File uploads and rewrite rules work fine. However, I didn’t tested any plugins yet.
I will write here if something breaks (sic! I hope not!).
If someone knows something about this issue, please feel free to share your thoughts, thanks.
Forum: Fixing WordPress
In reply to: Limit future posts by number or date in custom queryyeah it would be great but I think I cannot limit the query to one only category (only Events within the next 15 days then all other published post in standard descending order).
In this scenario two separate query & loop is the only way to go..or I’m wrong?
abyway, thanks for the suggestion.
Forum: Fixing WordPress
In reply to: Archives by both date and categoryCool!
Now I have a brighter vision, that function was really throwing me off the track.
Thank you so much!
Forum: Fixing WordPress
In reply to: Archives by both date and categoryoh, so I need to flush rewrite rules only if the permalink structure will change again, let’s say, by admin option or another plugin?