lee718
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: get the url of image attachmentIn case anyone needs this, here is my solution:
if ($_FILES) { function insert_attachment($file_handler, $post_id, $setthumb = 'false') { if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); require_once(ABSPATH . "wp-admin" . '/includes/image.php'); require_once(ABSPATH . "wp-admin" . '/includes/file.php'); require_once(ABSPATH . "wp-admin" . '/includes/media.php'); $attach_id = media_handle_upload( $file_handler, $post_id ); //get url $attachment_url = wp_get_attachment_url($attach_id); add_post_meta($post_id, '_file_paths', $attachment_url); $attachment_data = array( 'ID' => $attach_id ); wp_update_post($attachment_data); if ($setthumb) update_post_meta($post_id, '_thumbnail_id', $attach_id); return $attach_id; } foreach ($_FILES as $file => $array) { $newupload = insert_attachment($file, $pid); //getting the url for the new upload $attachment_url = wp_get_attachment_url($newupload); } }Forum: Plugins
In reply to: [Contact Form 7] auto responder not workingAnyone have any ideas as to why the mail sends but the auto response to sender and also the other auto responder using mail(2) does not work?
I really need to fix this soon or find an alternate solution.
Thanks
Can you tell me where that was/what you did to fix this. I am having the same issue.
ThanksForum: Plugins
In reply to: [WP Audio Player] flash player support for ipad and iphoneSorry, I meant html5?
Forum: Plugins
In reply to: [Portfolio Slideshow] Can't reorder slideshowHaving the same issue since I upgraded to 3.5. Does anyone know how to reorder the images?
Forum: Fixing WordPress
In reply to: home page duplicate active state in navigationaha, a js conflict.
Forum: Fixing WordPress
In reply to: Trying to get custom sidebar to workno link, working locally. I’ve added it to page template. Working on a twentyten child.
And yes I can get some of the standard widgets in like blogroll etc. I want to put in a siblings list. I have tested that function is working also, so the disconnect is in calling the specific sidebar. Do you see anything wrong there.
I appreciate your help.
Forum: Fixing WordPress
In reply to: Trying to get custom sidebar to workSiblings is just referring to a function that is listing children in my sidebar
Forum: Fixing WordPress
In reply to: Trying to get custom sidebar to workHope this is better:
functions.php:function siblings_widgets_init() { register_sidebar( array( 'name' => 'Children-List', 'id' => 'sidebar-children', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="someclass ">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'siblings_widgets_init' );sidebar.php:
<?php if ( !dynamic_sidebar('sidebar-children') ) : ?>' <?php siblings();?> <?php endif; ?> <?php endif; // end primary widget area ?> </div>and the call in the template:
<?php if ( !dynamic_sidebar('sidebar-children') ) : else : ?> <?php endif; ?>Forum: Fixing WordPress
In reply to: Trying to get custom sidebar to workI have updated my code and it’s still not working. So frustrating because I don’t see the issue. Here is my updated code. Any ideas?
functions.php:
function siblings_widgets_init() { register_sidebar( array( 'name' => 'Children-List', 'id' => 'sidebar-children', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="someclass ">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'siblings_widgets_init' );<code></code> <?php if ( !dynamic_sidebar('sidebar-children') ) : ?>' sidebar.php<?php siblings();?>
<?php endif; ?><?php endif; // end primary widget area ?>
</div><!– #primary .widget-area –>and the call in the template: '<?php if ( !dynamic_sidebar('sidebar-children') ) : else : ?> <?php endif; ?>Forum: Fixing WordPress
In reply to: Error establishing a database connectionIt was indeed config ID and password. Now I am only seeing the first page. What can I do to fix that?
Forum: Fixing WordPress
In reply to: Error establishing a database connectionWhat do you mean? What should I check?
Forum: Fixing WordPress
In reply to: video and post together as custom post type?I had tried the custom fields before and it didn’t working using “video” for key and the vimeo id only for the value. That seems logical. BUT I had forgotten to create the archive and single pages so maybe that is the issue.
Thanks, I’ll let you know how it goes.
Forum: Fixing WordPress
In reply to: exclude page and children uisng $post->post_parent in conditionalI found the answer to my problem was that I had the following which I removed.
$parent_id = $post->post_parent;Forum: Plugins
In reply to: News-Ticker plugin cycle.js not loadingI just realized my mistake. Should be…. ( ‘cycle’, plugins_url(‘news-ticker’) etc.