Want to send ajax request in wordpress to a custom file in plugin
Want to send ajax request in wordpress to a custom file in plugin
Want to send ajax request in wordpress to a custom file in plugin
Technically, this code looks like it is accomplishing what you are trying to do, and I don’t see any glaring holes. But, do you really intend on redirecting people away from your site when they just clicked to view someone’s bio? That sounds very confusing to the user and would result in a poor user … Read more
Creating a “Related Meta” type field?
Thanks for your answers! Maybe I was a bit unclear, but I don’t use ACF, it is just a field that comes with the theme. However, this question and answers helped to find the problem: https://stackoverflow.com/questions/34018588/wordpress-add-post-meta-data-doesnt-display-on-page-until-post-is-manually My WP metadata table entry was incomplete after creating a post programatically, the theme required another field. Saving the … Read more
Genesis doesn’t have built-in popup styling like (for example) bootstrap etc. You will have to find an extension plugin or built it custom. Take a look at this tutorial to start with CSS tooltips: https://www.w3schools.com/css/css_tooltip.asp
I cannot test this because I don’t have your code, but maybe you can get some ideas from it: add_filter( ‘wp_unique_filename’, ‘custom_image_name’, 10, 2 ); $img_id01 = media_handle_upload( ‘img_main’, $postID ); remove_filter( ‘wp_unique_filename’, ‘custom_image_name’, 10, 2 ); function custom_image_name( $filename, $ext ) { global $postID; $post = get_post( $postID ); return $filename . ‘-‘ . … Read more
Post meta entries are in your wordpress database, in the wp_postmeta table. I am just a newbie, not sure if this is right, but something I can think of that might help you in the right direction. Hope this helps. function wordpress_custom_post_meta_bulk() { $posts = get_posts(array(‘numberposts’ => -1) ); foreach($posts as $p) : $meta += … Read more
The reason for that is the save_post loop. When you call wp_insert_post, it triggers save_post and thus inserts the student meta. what you can do is, to check if the post type is correct while inserting the meta. like: add_action( ‘save_post’, ‘save_student_meta’, 10, 2 ); function save_student_meta( $post_id, $post ) { if ( ‘student’ !== … Read more
Look for string in posts and postmeta
It depends how and where you use this string. Possibly, you have to localize the date according to the site settings: <?php $date_format = get_option( ‘date_format’ ); $timestamp = strtotime( get_the_time() ); $localized_date = date_i18n( $date_format, $timestamp );