How to show random feed from DB and show content in my site

It’s difficult to answer this, but here are some suggestions: Make sure your feeds are valid, e.g. here. In the case of is_wp_error( $rss ) giving true, you can check the corresponding error message with $rss->get_error_message(). Develop with WP_DEBUG activated. Don’t use mysql_query(), it’s deprecated since PHP 5.5. Use the $wpdb object to fetch data … Read more

Custom archives page by month and year – nesting problem

After much more work, I developed a solution that outputs archives by year, month and day while minimising database calls. Posting it here for others to use: //* Add custom archives below entry content add_action( ‘genesis_entry_content’, ‘custom_archives_page_content’ ); function custom_archives_page_content() { global $post; // set post arguments $args = array( ‘posts_per_page’ => -1, ‘orderby’ => … Read more

PM PRO addon package check user access to a specific post

Got the answer figured out,dont know exactly what was wrong but just entered the ID( i.e 376) in each section instead of $post_id[0] array. Would be glad to know if something was wrong in the code I posted in my question. Thanks EDIT Was using $post_id[] = array(361,369,367,371,476); instead of $post_id = array(361,369,367,371,476);

Simple Share Buttons Add Plugin and Custom Post Type

Here is the solution : You need to hook an action to remove ssba button. Wp action runs pretty early and allow you to remove the ssba filter on the content which add the buttons list. function remove_share_buttons_custom_post() { if (in_array(get_post_type(),array(‘sar’))) { remove_filter( ‘the_content’, ‘show_share_buttons’); } } add_action(‘wp’, ‘remove_share_buttons_custom_post’);

add_filter > posts_where works partially

This doesn’t look like it would produce meaningful SQL, keys cannot hold different values at the same time (that’s why JOINs are usually required in complex queries). Also using $_GET global in queries is horribly insecure, if you have this anywhere near live site you should remove it immediately. You earlier question used WP_Query, if … Read more

Query wordpress posts on static page

By static page do you mean a WP page or do you mean a HTML page within the site? If it’s the first you need a page template, if it’s the latter then you need to include wp-blog-header.php into the file with php.

How to add google map to custom field

It looks like you’re missing some code according to the ACF docs – see example under “Required CSS & JS” – http://www.advancedcustomfields.com/resources/google-map/ Sadly – this page of the ACF documentation may be out of date. According to google maps API docs – you’ll need to create an API key for all their APIs (Embed, JS, … Read more