Creating a comments voting system
Creating a comments voting system
Creating a comments voting system
I found out a way to do this , turned out to be kind of easy here is what i did $Aschools = get_post_meta( get_the_ID(), ‘american_member_schools_field’, true ); $i = 0; $entries = count($Aschools); foreach ( (array) $Aschools as $key => $Aschool ) { $logo = $Aname=””; $i++; if ( isset( $Aschool[‘name’] ) ) $Aname … Read more
WordPress has no macros like that but it can be done. If the plugin is already installed, you can Network Activate it so it will be available on any blog in the network. As for the page with title, you’ll need to create or source a plugin to do that as it will need to … Read more
Use the intermediate_image_sizes filter and return an empty array: add_filter( ‘intermediate_image_sizes’, ‘__return_empty_array’ ); __return_empty_array is a helper function in WordPress, the above is all you need!
If you see the code, there is no hook to do that. But you can create your own function and remove the part that you don’t need like this function custom_wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = ”, $user_password = ”, $language=”” ) { if ( !empty( $deprecated ) ) _deprecated_argument( __FUNCTION__, ‘2.6’ ); wp_check_mysql_version(); … Read more
Private “Parents” content for school site
You can just use the get_option() function like this: <?php $main_dashboard_check = get_option( ‘main_dashboard_check’ ); var_dump( $main_dashboard_check ); /* outputs false if the value does not exist */ $main_dashboard_check = get_option( ‘main_dashboard_check’, ‘default_value’ ); var_dump( $main_dashboard_check ); /* outputs ‘default_value’ if the value does not exist */ ?>
I have done this way: // Find connected pages (for all posts) p2p_type( ‘actors_movies’ )->each_connected( $wp_query ); Now we have a $connected property attached to every post on the $wp_query, that is an array of posts connected by actors_movies. $actors = array(); while (have_posts()) : the_post(); $movies_acted = count($post->connected); if($movies_acted > 0) { $actors[$post->ID] = … Read more
I found out myself. I had to call media_upload_header(); in the Iframe and trigger the following javascript: var html=”stuff I want to return to editor”; var win = window.dialogArguments || opener || parent || top; win.send_to_editor(html); I have no Idea how, but this works.
I don’t really know what you mean by “using the WordPress API in a site as opposed to making it a theme” but I am assuming you mean something like “use the backend but not the front facing stuff”. So, given that, yes you can, but a lot of things will not work. There are … Read more