jadamson
Forum Replies Created
-
Forum: Plugins
In reply to: [WC Fields Factory] Going back to view product from the cart page@sarkparanjothi I understand that its basic browser behavior. BUT WC saves the values so I would expect this plugin to do the same, otherwise the user has 2 refill in any of the custom field values. O-well just my opinion.
Forum: Plugins
In reply to: [Gallery Factory Lite] Not Working on iPhone5 or 6 in ChromeSorry, I meant to add that. http://www.gasolinealleyinbath.com/photo-gallery/
Forum: Fixing WordPress
In reply to: Post editor broken – TinyMCE undefinedSince upgrading to 4.4.2 I seem to be having close to the same issue, I am getting an 404 on /wp-includes/js/tinymce/plugins/lists/plugin.min.js which is making the visual editor not work.
Did u ever find a solution?
Forum: Plugins
In reply to: the_post_navigation usage with a custom post typeI can get the next and previous links to work on single-portfolio.php, how would I add in the numbers though? <next 123…456 prev> is what I need to do
Forum: Fixing WordPress
In reply to: forcing www – WordPress Address and Site Address keep resettingfigured it out, I had old code in my function.php file
update_option('siteurl','http://www.guffeysautomotive.com'); update_option('home','http://www.guffeysautomotive.com');Forum: Fixing WordPress
In reply to: Loop through ALL images upload to custom post typeThank you very much Keesiemeijer! Here is the final working version in-case anyone else finds this page. It returns, all thumbnails from a specific post type, links them to the parent page and adds alt text.
$post_type = 'portfolio'; global $wpdb; $where = get_posts_by_author_sql( $post_type ); $query = "SELECT * FROM $wpdb->posts p where p.post_type = 'attachment' AND (p.post_mime_type LIKE 'image/%') AND (p.post_status = 'inherit') AND p.post_parent IN (SELECT $wpdb->posts.ID FROM $wpdb->posts {$where} ) ORDER BY p.post_date DESC"; $results = $wpdb->get_results( $query ); if ( $results ) { foreach ( (array) $results as $image ) { $url = get_attachment_link($image->post_parent); $thumb = wp_get_attachment_thumb_url( $image->ID ); $alt = get_post_meta($image->ID, '_wp_attachment_image_alt', true); print '<li><a href="' . $url . '"><img src="' . $thumb . '" alt="' . $alt . '" /></a></li>'; } }Thanks again for your help!
Forum: Fixing WordPress
In reply to: Loop through ALL images upload to custom post typeThank you. I am attempting the custom query one, its sooooo close. The problem is, I don’t want the image linked to the single attachment page, I need it to link to the page it was uploaded to. Here is what I have so far…
$post_type = 'portfolio'; global $wpdb; $where = get_posts_by_author_sql( $post_type ); $query = "SELECT * FROM $wpdb->posts p where p.post_type = 'attachment' AND (p.post_mime_type LIKE 'image/%') AND (p.post_status = 'inherit') AND p.post_parent IN (SELECT $wpdb->posts.ID FROM $wpdb->posts {$where} ) ORDER BY p.post_date DESC"; $results = $wpdb->get_results( $query ); if ( $results ) { foreach ( (array) $results as $image ) { print wp_get_attachment_link( $image->ID,thumbnail,true ); } }wp_get_attachment_link is giving me a link in this format, mysite/myCustomPostType/PageUploadedTo/AttachmentPage. Is there a way to just make it link to mysite/myCustomPostType/PageUploadedTo ?