page wordpress add extra unwanted stuff
Add this to your functions.php, this should give the result you’re looking for: remove_filter(‘the_content’, ‘wpautop’);
Add this to your functions.php, this should give the result you’re looking for: remove_filter(‘the_content’, ‘wpautop’);
Figured it out, I was using the wrong function. Correct function was get_the_category_by_ID($cat);
Enable the category taxonomy for your custom post type, or enable it for the default page post type: function wpa_cats_for_pages(){ register_taxonomy_for_object_type( ‘category’, ‘page’ ); } add_action( ‘init’, ‘wpa_cats_for_pages’ ); Then within your page template, get the category IDs assigned to the client page and create a new query which passes those IDs: // get IDs … Read more
Looping through posts First of all, you need to have two separate loops – one for whatever it is that it’s displaying right now and second one for your custom post type. Right now the block where you want your custom posts to appear is located within the first loop, and that’s not good. I … Read more
I can’t comment yet, so I’ll tell you here what you can change immediately: $countryinfo = $wpdb->get_row(“SELECT * FROM wp_num_countries WHERE countryID = “.$country_id); to $countryinfo = $wpdb->get_row($wpdb->prepare(“SELECT * FROM wp_num_countries WHERE countryID = %d”, $country_id)); because you directly use $_POST variable, so $wpdb->prepare will format and prepare your query string. But that code looks … Read more
If all you need is to show the hierarchy in the menu, choose Appearance->Menus and build your hierarchy there by using Custom Links. Use # for levels that don’t need to have a page, but use a URL when you get to the bottom level (a page that has content). You can then arrange them … Read more
Check the post type: function aisis_page_button_link(){ global $post_ID, $temp_ID, $iframe_post_id; if ( ‘page’ !== get_post_type( $post_ID ) ) return; // continue
Were you ever able to sort this out? I’m having the same issue. Best I can tell, somewhere after the save_post fires the $_POST data for that post/form gets trashed. fwiw, what I’m considering doing is doing my validation and then using a post_meta as a proxy for $_POST. In other words, if validation fails … Read more
I fixed part of my issue by setting the “posts_per_page” => -1
The primary stylesheet for a theme is usually /wp-content/themes/themename/style.css. That would be the first place to look. That file has to exist, but may be mostly empty and other stylesheets can be loaded by both theme and plugin. Some themes have very complicated stylesheet structures. The easiest way to find the stylesheets is with a … Read more