Dario Devcic
Forum Replies Created
-
Forum: Plugins
In reply to: [Really Simple CSV Importer] featured imageHave you tried with “post_thumbnail”? Works good.
Forum: Plugins
In reply to: [Really Simple CSV Importer] "All Done" but nothing importedMake sure that your CSV have column “post_status” with value “publish”. Possible values you may want:
‘publish’ – A published post or page
‘draft’ – a post in draft status
‘future’ – a post to publish in the future
‘private’ – not visible to users who are not logged inIf you import CSV without proper “post_status” value, posts can’t be displayed in admin, although imported correctly.
Forum: Plugins
In reply to: [Page Builder by SiteOrigin] The_content conflict with mega menuTry to remove all filters from the_content()
remove_all_filters( 'the_content', 1 );
and then add filters you need… something like this.add_filter('the_content', 'do_shortcode'); $output .= apply_filters( 'the_content', $post->post_content );
Not tested, just a quick guess.
Forum: Reviews
In reply to: [Download Monitor] All StarsHave you tried with “Download Monitor Legacy Importer” plugin?
“If you want to update from a legacy version (old 3.0.x version) of Download Monitor, after installing the new version you’ll need to also install and run the Download Monitor Legacy Importer. This will handle migrating all of your data to the new format.” – https://mikejolley.com/2013/06/download-monitor-page-addon-legacy-importer-are-in-the-wild/Remove old plugin instal new one and install Legacy Importer, go to Tools > Import, click “Download Monitor Legacy Importer” and follow the on-screen instructions.
(but before anything backup you database just in case)Forum: Reviews
In reply to: [Redux Framework] It's all I've ever use from here on in.I like your review, straight from the heart ?? I share your feeling. In addition to being a top-notch product, Redux has way better support than many other well known commercial/premium plugins. That’s what Premium really is.
Forum: Reviews
In reply to: [MP6] Good WorkThose 2 sites.. what is a difference between them and other 8? Some plugins, different themes…? There must be something.
Forum: Reviews
In reply to: [MP6] Good WorkWhat do you mean by “theme lost the style”? Is it the front-end which is broken or is it just some admin areas, like theme options panel? If you have problems with backend in some themes it is understendable at this point of development, but most probable it’s the theme issue.
Here is the solution. In class-swboc-widget.php find lines 28-30:
foreach ( $swboc_posts as $post ) { echo apply_filters( 'the_content', $post->post_content ); }
change to:
foreach ( $swboc_posts as $post ) { remove_all_filters( 'the_content', 1 ); add_filter('the_content', 'do_shortcode'); $swboc_output = apply_filters( 'the_content', $post->post_content ); echo wpautop($swboc_output); }
Explanation: remove_all_filters function removes all of the hooks from filter. Function has two parameters, $tag – the filter to remove hooks from (the_content) and $priority.
This function will also remove the shortcode filter, so we need to re-add it. wpautop filter is also removed so we echoing wpautop(output).
You can use the same logic in class-swboc-front.php for shortcode output.Forum: Plugins
In reply to: [WP Google Fonts] [Plugin: WP Google Fonts] warningschange lines 81 and 82
//"Constants" setup $this->thispluginurl = WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)).'/'; $this->thispluginpath = WP_PLUGIN_DIR . '/' . dirname(plugin_basename(__FILE__)).'/';
Forum: Plugins
In reply to: [AnythingSlider for WordPress] [Plugin: AnythingSlider for WordPress] Order?? glad to have been of help.
Forum: Plugins
In reply to: [AnythingSlider for WordPress] [Plugin: AnythingSlider for WordPress] Orderthere is one more attribute: order=ASC or order=DESC
Now I see my code is to long. I put it on pastebin https://pastebin.com/K99B5G4a
I made it, it’s pretty simple. In insert.php add new select element with all themes, in function InsertSlideshow() add new var theme. then in main file change $theme value, $attr instead $options.
mistercyril, what is value of your custom field ‘bg_images’, is it a field with a single value or field with multiple values? How did you created this custom field?
This is how I made it. I use meta-box (https://github.com/rilwis/meta-box) plugin where uploaded images ID’s are saved as a field with multiple values. So first I need to check all values from array, then reset array and get only first value. Further, each uploaded image is treated as an attachment so I need to use wp built-in function to get image URL.
here is my code:
global $post; $post_id = get_post_custom($post->ID); $slide_bg_array = get_post_meta($post->ID, "custom_meta_slide_bgimg", false);
global $wpdb; if ( !is_array( $slide_bg_array ) ) $slide_bg_array = ( array ) $slide_bg_array ; if ( !empty( $slide_bg_array ) ) { $slide_bg_array = implode( ',', $slide_bg_array ); $images = $wpdb->get_col( " SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN ( $slide_bg_array ) ORDER BY menu_order ASC " ); $image = reset($images); } else { $image = ""; } $imgsrc = wp_get_attachment_image_src( $image, 'full' ); $imgsrc = $imgsrc[0]; $slide_bgimg = "url(". $imgsrc .")";
And later I changed output. As you can see I use many other custom fields and everything works great.
$output .= "<div style='background-image:" . $slide_bgimg . "; background-color:" . $slide_bgcolor . "; width: 100%; height: 100%;' class='content clearfix'>" ; $output .= do_shortcode($content) ; $output .= "<h1 class='entry-title-slider1 slide_1'><a href=". $blaurl ." >" . $bio . "</a></h1>"; $output .= "<div class='post-category slide_2'>" .$field_1. $field_2. "</div>"; $output .= "</div>";
Hope this helps.
Forum: Plugins
In reply to: [AZIndex] azindex – custom post typesPlugin by default works with two deafult WordPress taxonomies ‘category’ and ‘post_tag ‘. As you already know WordPress has three built in taxonomies ‘category’, ‘post_tag’ and ‘link_category’. Further, plugin trace two WordPress post types ‘post’ (normal posts) and ‘page’. When you know this and that, you can easily modify plugin to index your_custom_taxonomy and your custom_post_type.
You need to modify two files: az-index-admin.php and az-index-cache.php. If you don’t need to index your posts, the most easiest way to make it work with custom post/taxonomy is to change ‘category’ into ‘ your_custom_taxonomy’ ($taxonomy), (there is several occurrences in both files) and to change ‘post’ into ‘your_post_type’ ($object_type), there is several occurrences in az-index-cache.php. And that’s it.