niklas.sven
Forum Replies Created
-
Example this works ok in there (funtions.php), but how to get post id there?
add_filter('upload_dir', 'add_date_to_upload_dir'); function add_date_to_upload_dir( $param ) { $post_id = ????; // How to get post ID here to variable? $date = date('d'); $dir = '/' . $date; $param['path'] = $param['path'] . $dir; $param['url'] = $param['url'] . $dir; return $param; }I just imported, and I have defined additional image sizes in functions.php.
I imported .csv and define image source from web as featured image, and it imports images and create additional image size, so this is great thing.
That I do not understand that it creates extra image size in upload folder 133×100. I have not defined this size in any where, and when I upload media form WordPress it self this is not happening, so in some point in CSV import this additional size is created.
Forum: Plugins
In reply to: [WP-PostViews] Get views by custom post types?Maybe this is not plugin issue then. The query is working other parts on the site but when I like to filter views by post types, it does not work.
Post type is post_type_animal, cause I created it that way.
Thanks for answer, I must research this issue more.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Filter custom post type in category.php?Ok, I look there. But when I do search for custom post types,
WordPress uses this: post_type=
And with Relevanssi I must put extra s to the end: post_types=
But thanks for clearing that Relevanssi does not apply this in categories.php it is only in search.