do_action Nested List

If you want to return a value in your hook, use apply_filters instead of do_action, like: $project_option .= ‘<ul class=”project-list”>’; foreach( $projects as $project ) { $project_id = $project->ID; $project_option .= ‘ <li class=”project” id=”project-‘ . $project_id . ‘”> <span class=”project-title”>’ . get_the_title( $project_id ) . ‘ </span> <span class=”project-status-title”>’ . __( ‘Project Status: ‘, … Read more

White screen after plugins upgrade

Connect to FTP using FileZilla. Rename each plugin folder name one by one and see which plugin is causing the issue. Once you found out the plugin which is causing the problem. Just reinstall it.

php code crashes site – possible syntax error

It’s hard to debug only seeing a portion of your code. For starters, you’ve got two <?php opening tags at the top which would certainly cause an error. But I think that’s leftover from your copy and paste. Look at your php server log which will tell you what file and line number the error … Read more

AJAX Load more start with x posts

You need to set the offset in the query. To get the right offset value, you will need to store and send back the offset value to your ajax script (data-offset in the input or an hidden field). $args = array( ‘posts_per_page’=> 10, ‘post_status’=> ‘publish’, ‘offset’=> $_POST[‘offset’] ); $_POST[‘offset’] is coming from your button with … Read more

Setting Up PHP Workflow in WordPress

Having a local environment that is the same for all devs is pretty easy to setup using vccw.cc or basic-wordpress-vagrant. Use Git for plugins and themes — each as their own repo. Free private repos are available on Bitbucket. Pass your DB around using WP-CLI or wordmove to sync settings and content.