How to hide Ads From Certain Categories?
<?php if( !is_category(1469) && !in_category(1469) ):?> AD CODE GOES HERE <?php endif;?> Above code worked: It should put endif at the end. Example: http://gameslopedy.com/full-game-downloads/test-post/
<?php if( !is_category(1469) && !in_category(1469) ):?> AD CODE GOES HERE <?php endif;?> Above code worked: It should put endif at the end. Example: http://gameslopedy.com/full-game-downloads/test-post/
Yes, this is possible using the correct plugin. Audio Album is just one such plugin. Try searching the plugin repository using a variety of different queries, and you’ll probably find what you are looking for. Here’s a search on “mp3 album“. As for customising the appearance of the player interface, this depends, in part, on … Read more
You can use this code to automatically send an email whenever a post of the type one is published. This goes into your theme’s functions.php : <?php function post_published_notification( $ID, $post ) { $type = get_post_type($ID); if ($type == ‘post-type-one’){ $author = $post->post_author; /* Post author ID. */ $name = get_the_author_meta( ‘display_name’, $author ); $email … Read more
I assume you want something like the following: An HTML output could help us to understand the issue more clear. However, you can set the position of the parent to relative, using: p.your-p-class { position:relative} Then, position your button as absolute. .pin-it-button{ position: absolute; top:-50%; left:50%} This will set your pin halfway from top and … Read more
$default_data = Array( “plugin551-setting-group” => Array( ‘checkboxoption1’ => ‘true’, ‘checkboxoption2’ => ‘true’ ) ); if ( is_admin() && isset($_GET[‘activate’] ) && $pagenow == ‘plugins.php’ ){ global $default_data; plugin551_save_settings($default_data); } function plugin551_save_settings ( $data ) { if( isset( $data[‘plugin551-setting-group’] )){ array_walk_recursive( $data[‘plugin551-setting-group’] , ‘plugin551_clean_options’); update_option( ‘plugin551-setting-group’ , $data[‘plugin551-setting-group’] ); } } function plugin551_clean_options(&$value) { $value = … Read more
Yea, Max pointed this out already – check what the console spits out when you click the button. On Chrome you can access the console via the Open Developer Tools (Win: F12, Ctrl + Shift + I | Mac: Cmd + Opt + I). The “Console” tab is what you are looking for. Have it … Read more
Four changes to your script. Limit $users to users with ‘administrator’ role. Removed line if($user->caps[‘Administrator’]!=1) continue; as every user is an administrator. Changed ‘post_per_page’ to -1, to process all posts. Added wp_reset_postdata(); after each loop: $users = get_users( array( ‘role’ => ‘administrator’ ) ); foreach ( $users as $user ) { $query = new WP_Query( … Read more
WordPress uses wp_enqueue_script() to register and enqueue javascript contained in a separate file. The default behavior is for wp_enqueue_script() is to load the script before the </body> tag, and apparently WordPress pages require the script to be loaded in the footer. As pointed out in the comments, the clue to this problem with the loading … Read more
Although the RFC for cookies implies that dashes are OK in a cookie name, others have experienced issues with using dashes in a cookie name. Try changing the name of the cookie to something without a dash. Only alphanumeric characters are allowed, but underline characters seem to be OK. Reference this question/answer: https://stackoverflow.com/questions/18907771/can-http-cookie-name-contain-dashes/27235182 ; the … Read more
Your problem is the constants OBJECT_K. In the documentation you can read that this constant ensures that duplicate keys are discarded. From the wordpress codex entry: Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number. … Read more