piffpaffpuff
Forum Replies Created
-
Forum: Plugins
In reply to: [Related Links] [Plugin: Related Links] Thumbnail for related posts?of course with the wordpress internal functions. every link contains the the post_id.
<?php echo get_the_post_thumbnail( $link['id'], 'thumbnail' ); ?
Forum: Plugins
In reply to: [Related Links] [Plugin: Related Links] Not available in widgets areathis plugin isn’t a widget!
clarification: i would like to publish posts automatically.
ok now the blank page is gone. but new blog posts still don’t appear on the facebook page. i’ve entered all needed data in the settings. and on the posts page i only get the facebook connect button. do i have to login to facebook first?
version 1.5 has now a search field.
Forum: Plugins
In reply to: [Related Links] [Plugin: Related Links] show Label instead of typeyou need to get the post type object:
$links = get_related_links(); foreach($links as $link) { $type_object = get_post_type_object($link['type']); echo $type_object->labels->singular_name; }
yeah. or check the count of the array. btw: the trueargument in get_related_links is wrong.
$related_links = get_related_links(); if(count(related_links) == 0) { // no links } else { // has links }
great to hear that! i will gladly test the new version.
you’re right, sorry i forgot to copy/paste that portion. here again the whole code:
/** * Display the the correct page as selected when the post type is portfolio */ function fn_page_css_class($css_class, $page) { if (get_post_type() == 'portfolio' || is_page('##page_name##')) { if ($page->ID == get_option('page_for_posts')) { foreach ($css_class as $key => $value) { if ($value == 'current_page_parent') { unset($css_class[$key]); } } } if ($page->post_name == '##page_name##') { $css_class[] = 'current_page_parent'; } } return $css_class; } add_filter('page_css_class','fn_page_css_class', 10, 2);
thanks for the suggestion, i like the idea. it is noted down for a future release but i can’t tell you when this feature will be available.
i’ve got the same problem. in your theme add the following code to your functions.php file. don’t forget to replace ##page_name## with the name/slug of the page you are displaying the portfolio:
/** * Display the the correct page as selected when the post type is portfolio */ function fn_page_css_class($css_class, $page) { if (get_post_type() == 'portfolio' || is_page('##page_name##')) { if ($page->ID == get_option('page_for_posts')) { foreach ($css_class as $key => $value) { if ($value == 'current_page_parent') { unset($css_class[$key]); } } } if ($page->post_name == '##page_name##') { $css_class[] = 'current_page_parent'; } } return $css_class; }