Passing multiple variables through url (php)

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

Conditional Content Display

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(); ?>”>&raquo; read more…</a> … Read more

Adding code to the function file

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.

PHP code rendered in HTML

It was indeed an encoding issue. Opening with Notepad++ (I’ve managed to open it from a PC), I’ve realized that the file was encoded as UCS-2 something (I don’t remember exactly if Big or Little Endian). I have no idea why this happened and how to avoid that in the future, as I’ve simply created … Read more