can’t access dashboard and showing forbidden page

Here is the short sweet answer. Somewhere you, a plugin, or your theme are doing something like this: wp_register_script( ‘myscript’, get_template_directory_uri() . ‘/path/to/myscript.js’, ”, ”, true ); What should be happening is this: add_action( ‘wp_enqueue_scripts’, function() { wp_register_script( ‘myscript’, get_template_directory_uri() . ‘/path/to/myscript.js’, ”, ”, true ); } ); From the Notice: Scripts and styles should … Read more

Trying to see if page is category or single and displaying title with appropriate heading tag

aha…white screen of death. I don’t know how I missed it. Your if statement lacks parenthesis. Try this: public function title() { if ( is_category() ) { echo ‘<h2 class=”post_title”>’; } else { echo ‘<h1 class=”post_title”>’; }; echo ‘<a href=”‘; the_permalink(); echo ‘” data-disqus-identifier=”‘; the_ID(); echo ‘”>’; the_title(); if ( is_category() ) { echo ‘</a></h2>’; … Read more

Find Videos Inside a Post

This is the statement I am currently using to extract YouTube URLs from a post: preg_match(‘|http://www.youtube.com/watch\?v=([a-zA-Z0-9\-\_]+)|’, $post->post_content, $matches); $matches[1] contains the ID of the first video. This may not cover all the YouTube URL formats, but it should give you a start.