squizeers
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] file-uploading-and-attachmentI am so tired now… Both functions below result the same. You can see the result here.
This one works, sends the attachments.Attachments are hard coded.
/*WORKING*/ add_filter( 'wpcf7_mail_components', 'mycustom_wpcf7_mail_components1' ); function mycustom_wpcf7_mail_components1( $components ) { $components['attachments'] = array('wp-content/uploads/2014/02/JASON-Deodorant1.pdf','wp-content/uploads/2014/02/JASON-Dandruff.pdf'); return $components; } /*WORKING*/
This one does not work. Attachments are dynamically pulled from the custom meta box.
/*NOT WORKING*/ add_filter( 'wpcf7_mail_components', 'mycustom_wpcf7_mail_components2' ); function mycustom_wpcf7_mail_components2( $components ){ $differentarray = array(); $sheets = rwmb_meta( 'brand_sell_sheet','type=file' ); foreach ((array)$sheets as $value) { $differentarray[]= ltrim($value["path"],'/home/rajumaha/public_html/project/hain/'); } $components['attachments']= $differentarray; return $components; } /*NOT WORKING*/
Somebody please help
Forum: Plugins
In reply to: [Contact Form 7] file-uploading-and-attachmentThis is the closest I could get but still not working.
add_filter( 'wpcf7_mail_components', 'mycustom_wpcf7_mail_components' ); function mycustom_wpcf7_mail_components( $components ){ $differentarray = array(); $sheets = rwmb_meta( 'brand_sell_sheet', $args = array('type'=>'file' ), $post_id = null ); foreach($sheets as $value){ $differentarray[] = ltrim($value["path"],'/home/rajumaha/public_html/project/hain/'); } //print_r ($differentarray); $components['attachments']= $differentarray; return $components; }
Forum: Plugins
In reply to: [Contact Form 7] file-uploading-and-attachmentWHY IS THE NOT WORKING?
The emails doesn’t get send… the sending gif animation loads forever…function mycustom_wpcf7_mail_components( $components ){ $sheets = rwmb_meta( 'brand_sell_sheet', $args = array('type'=>'file' ), $post_id = null ); foreach($sheets as $key => $value){ $path.= "'".ltrim($value["path"],'public_html/project/hain/')."',"; } $attachments = rtrim($path,","); $components['attachments']= array($attachments); return $components; } add_filter( 'wpcf7_mail_components', 'mycustom_wpcf7_mail_components' );
Forum: Plugins
In reply to: [Contact Form 7] file-uploading-and-attachmentVery close to what I want :
add_filter( 'wpcf7_mail_components', 'mycustom_wpcf7_mail_components' ); function mycustom_wpcf7_mail_components( $components ) { $components['attachments'][] = 'wp-content/uploads/pdf/r.maharjan.pdf'; return $components; }
Now I have to collect the PATH of all the pdfs listed in a post. HOW?
Forum: Hacks
In reply to: Get the large image of the gallery imageSolved the issue by using the function at:
https://philipnewcomer.net/2012/11/get-the-attachment-id-from-an-image-url-in-wordpress/
now my code looks like:
<?php $galleries = get_post_galleries_images( $post ); foreach( $galleries as $gallery ) { foreach( $gallery as $image ) { echo $imageID = get_attachment_id_from_url( $attachment_url = $image ); $largeImage = wp_get_attachment_image_src( $imageID,large ); $image_list .= ' <div class="col-xs-4 col-sm-4"> <a class="fancybox'.$post->ID.'" rel="fancybox'.$post->ID.'" href="'.$largeImage[0].'"><img src="'. $image .'"/></a> </div>'; } } echo $image_list; ?>
ya this is strange… “Why do the year and month links produce a list of all posts in all categories?”
Forum: Fixing WordPress
In reply to: active ancestor category while on the postany one???
can u share the link so that i can take a look at it?
Looks like I am in the right discussion.
So I installed the smarter navigation so that the posts can be navigated if they have the same tags. But there is no plugin setting page where i can manage the plugin. And I am not sure if the plugin does what i am looking for.
Does this plugin navigate the posts whaich have same tags?Forum: Fixing WordPress
In reply to: Custom fields in searchI do not want to use that plugin because it searches everything but i want to include only certain custom fields.
I am trying to use this plugin for sharing the individual images of the default wordpress gallery. How do I do that?
Forum: Plugins
In reply to: [Cat + Tag Filter] [Plugin: Cat Tag Filter] Exclude TaxonomyFOR CATEGORY AND SUB CATEGORY FILTER I DID FOLLOWING
<?php wp_dropdown_categories('selected=-1 &hierarchical=1 &depth=1 &hide_empty=0 &exclude=1,4,6,11,12,149,150,151 &show_option_none=Select Category &name=main_cat'); ?> <select name="sub_cat" id="sub_cat" disabled="disabled"> </select> <script type="text/javascript"> var dropdown = document.getElementById("sub_cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; </script>
Forum: Fixing WordPress
In reply to: Error establishing a database connection (Config file OK)I am using the OVH hosting also. I have contacted thier technical support for database host but it has not workrd for me. Can u please tell me what would be the database host?
Forum: Plugins
In reply to: [Cat + Tag Filter] [Plugin: Cat Tag Filter] Exclude TaxonomyThanks for the quick response. Will try it and let you know.
Forum: Plugins
In reply to: [Cat + Tag Filter] [Plugin: Cat Tag Filter] Exclude TaxonomyIs it possible to have sub categories instead of tags of the categories selected? Or if there is any plugin that does it.