Code Highlighting in BlockQuote

First of all you should use the standard pre and code elements instead of blockquotes. But if have too many to change them, there might be a workaround. If you only use blockquotes for code, then you can use a bit of jQuery to convert those to pre tags, but make sure to do that … Read more

echo or return? [duplicate]

Functions can only return one value. Change all the echo statements in your tweet function to concatenate a string, then return the string at the end of the function.

Open all external links in new window – need help with the code

Way to complicated to do this with php in WordPress, I’d advice on doing this on the frontend with a bit of jquery magic. I wrote a tiny jQuery plugin that opens all external links (all links with another domain/host name than the current site) in a new window. Check out the plugin: https://www.npmjs.com/package/jquery.jold.external-hrefs To … Read more

Show page title just from the first child-page in template

Use WP_Query class to do it: $the_query = new WP_Query( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, ) ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <h2 class=”subpagetitle”> <a href=”https://wordpress.stackexchange.com/questions/55118/<?php the_permalink(); ?>” rel=”bookmark” title=”<?php the_title(); ?>”> <?php the_title(); ?> </a> </h2> <?php endwhile; // Reset Post Data wp_reset_postdata();

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)