Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
I think you are looking for wp_get_attachment_image_src instead of wp_get_attachment_src which is not a core WordPress function
I think you are looking for wp_get_attachment_image_src instead of wp_get_attachment_src which is not a core WordPress function
WordPress admin bar is rendered by render() method in WP_Admin_Bar class, also you may need to check wp_admin_bar_render(), it add few hooks before and after rendering and also calls this method
I do not believe a plugin would be needed for this. You could add a class to the menu item (enable the class field under Screen Options when you are editing the menu item). Also be sure that you have the body_class() function applied to your body tag. Then you can do: .your-menu-item-class { display: … Read more
Since actual output seems to be done via echoing global variable nothing prevents you to change that variable to something else (between the points where theme creates and echoes it). Like a result of advertisement manager function call. However I think it would make more sense to stick with one of two functionalities rather than … Read more
You can use the following filter: add_filter(‘wp_list_pages’, ‘foo_bar’); function foo_bar($html){ //Create a regex pattern to identify the LI element with preg_match //Create another pattern to identify the class attr and alter it with preg_replace return $html; } As I’m not familiar with the exact elements you are working with, I can’t write up a regex … Read more
The request to Twitter API in that code is formulated as URL. It is easy enough to modify it. see GET search in Twitter API documentation see advanced search for formulating queries Then put resulting query in request. Use http_build_query() or related functions to encode spaces and such properly.
The page for ‘work categories’ appears as a sub-menu page of ‘Work’ CPT, after you’ve registered it correctly. These are very good posts to get started with CPTs: Thinkvitamin and Justin Tadlock. I always refer these when stuck with CPTs.
Assuming that $_product->details contains what can be referred to as post content, and contains HTML, and you want to have that HTML rendered by the browser then you’re doing it wrong. Please refer to the esc_html function and play around with it in a sandbox – you will soon find out that what the function … Read more
You’ll need to remove the_title(); section from the following templates: content-aside.php content-featured.php content-gallery.php content-image.php content-intro.php content-link.php content-page.php content-quote.php content-single.php content-status.php content.php Open the files and look for this: <h2 class=”entry-title”> <a href=”https://wordpress.stackexchange.com/questions/33038/<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”> <?php the_title(); ?></a> </h2> The content will … Read more
If you use the built in get_terms function you end up with a quick one liner: function get_positional_ids(){ return get_terms( ‘category’, array(‘fields’ => ‘ids’, ‘name__like’ => ‘_’)); } no custom SQL, safe and simple.