coopersita
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Posting image to home page does not workMy guess (since I can’t see the code in your home page), is that in the post you are putting the image in the entry itself, but the home page is set up to use the “Featured Image”:
Forum: Fixing WordPress
In reply to: Click to make picture open in blank windowWhen you are uploading the picture, there is an option for the link for the picture. In the following link, go to step 4, and in the image, you’ll see the “Link URL”. You just need to change that:
Forum: Fixing WordPress
In reply to: Filtering Custom Post Type admin panel by custom meta dataI’m not sure I understand what you want to do, but if it’s what I think you are asking, this article may help (scroll to step 4):
https://thinkvitamin.com/dev/create-your-first-wordpress-custom-post-type/Forum: Fixing WordPress
In reply to: problem with homepageWhat’s the URL?
Forum: Fixing WordPress
In reply to: htaccess tweaks to ignore non-WP directoryWordPress is setup to allow you to visit your directories without having tomodify htaccess.
I had the same problem when trying to install Magento, because they recommend you set the directory to 777, but most shared hosts won’t allow you to have a directory open like that. Once I changed the permissions to 775, I had no problem.
I don’t know if that helps, but that’s how I fixed my issue.
Forum: Fixing WordPress
In reply to: Problems with autosave and custom fieldsNo one?
Forum: Fixing WordPress
In reply to: password protect postsHow about adding an extra field in the comment form template for their actual name?
Forum: Fixing WordPress
In reply to: center align entire siteWhich version of WordPress, and which theme are you using?
Forum: Fixing WordPress
In reply to: foreach() error when posting custom valuesI may be wrong, but you’d get that error if $mykey_values is not an Array or it’s null.
Forum: Plugins
In reply to: Custom Fields – Lost by Autosave??I’m adding a bunch of custom field boxes for some of my custom post types, but I’m a bit unsure about the hidden field and it’s check (steps 1 and 2 mentioned by dotnetchic).
I understand that you have to put something like:
echo '<input type="hidden" name="mytheme_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />
But, if I have more than one custom field box, do I need to add it to each one? And if so, how do I customize each one? Is the name “mytheme_meta_box_nonce” customizable, or is that the name it should always have?
Then, to check the hidden field you need:
if (!wp_verify_nonce($_POST['mytheme_meta_box_nonce'], basename(__FILE__))) { return $post_id; }
But if each box has a different hidden field, do you need to check them all, or you use the same one for all boxes, and then you just check one?
Thanks
Forum: Fixing WordPress
In reply to: add_meta_box based on custom postsFigured it out.
I used a custom query, instead of the loop:
add_action("admin_init", "admin_init"); function admin_init(){ add_meta_box("credits_meta", "Credits", "credits_meta", "projects", "side", "low"); } function credits_meta() { global $post; global $wpdb; $custom = get_post_custom($post->ID); $designers = $custom["designers"]; ?> <?php $querystr = " SELECT wposts.* FROM $wpdb->posts wposts WHERE wposts.post_type = 'staff' AND wposts.post_title != 'Auto Draft' ORDER BY wposts.post_name DESC "; $my_query = $wpdb->get_results($querystr, OBJECT); if( $my_query ) { foreach( $my_query as $s ) { $checked = ''; if(count($designers) > 0) { foreach ($designers as $d) if ($d == $s->ID) $checked ='checked = checked'; } ?> <p><input type="checkbox" name="designers[]" value="<?php echo $s->ID ?>" <?php echo $checked; ?>> <?php echo $s->post_title; ?></p> <?php } } } add_action('save_post', 'save_details'); function save_details(){ global $post; delete_post_meta($post->ID, 'designers'); if ($_POST["designers"]) { foreach ($_POST["designers"] as $x) add_post_meta($post->ID, "designers", $x, false); } }
Forum: Fixing WordPress
In reply to: Home page post images have disappearedI checked your page, and it’s looking for images here:
https://www.emotionalhealthtips.com/wp-content/themes/atahualpa/images/If you go to your theme folder:
https://www.emotionalhealthtips.com/wp-content/themes/atahualpa/You get some errors from functions.php. Did you add any code there?
For now, I added some of my pages manually… Not perfect but at least the info gets to the map. I hope this gets fixed soon.
Does anyone know if there is a sitemap plugin that does include the post types?
Forum: Fixing WordPress
In reply to: Conditional check for Javascript?I posted a possible solution in your old thread: https://www.ads-software.com/support/topic/417120
Forum: Fixing WordPress
In reply to: Post content ( the_content() ) in lightbox or modal window?Good point!
How about in the url you add, via javascript, another GET value for JS enabled. If the variable isn’t set (no JS), then in the lightbox page you redirect to the full size page?
<h2 class="entry-title"><a href="/lightbox/?pid=<?php echo the_ID(); ?><script type="text/javascrpipt">document.write('&js=yes');</script>"><?php the_title(); ?></a></h2>
In the lightbox page, before anything else:
<?php if(!isset($_GET['js']){ $permalink = get_permalink( $_GET['pid'] ); header( 'Location: '.$permalink ) ; } ?>
I think that will probably work, although it may not be very elegant…