Odd page behaviour after removing sidebar
Use the code validator at http://validator.w3.org/ to find and fix a missing closing </div> tag or other html errors that are causing the display problem.
Use the code validator at http://validator.w3.org/ to find and fix a missing closing </div> tag or other html errors that are causing the display problem.
I’m assuming these are the post details the you’re trying to pass through the URL. Not sure if that is the most effective way to go about doing this. I do the same type of thing, but pass the postID through the URL and when I get to the destination page, use the postID to … 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
You could simply try using this plugin. If you want to custom-code it, that plugin would be a good place to start and look at how they’re doing it…
You can’t execute PHP code from within a string. You can however define a function that executes code and call that function within your if clauses. function dz_slick_longstring() { $query = new WP_Query(‘category_name=intro-paragraphs’); if($query->have_posts()) : while($query->have_posts()) : $query->the_post(); ?> <div class=”mid-box”> <h1><?php the_title(); ?></h1> <?php echo excerpt(40); ?><br/> <a href=”<?php echo get_permalink(); ?>”>» read more…</a> … Read more
You are looping through all states and running a query on each iteration, but the query you are doing is nothing to do with the loop. You are checking for $_GET[‘state’], which would be the state passed over the query string. <?php foreach ( $states as $state ) { $state_query = new WP_Query( array( ‘post_type’ … Read more
If you move the function and the add_filter function to the functions file, the you don’t need to echo the function after. If the function doesn’t involve using add_filter then you could echo out the function in your template file. Placing it in the functions.php file, will run on every page/post load unless specified otherwise.
As @birgie pointed out, add a conditional statement to check that the date has been set: if ( isset( $item->date ) && strlen( $item->date ) > 0 ) { … }
Permalink of Custom Post Type
MySQL Engine vs. Charset