Different ads on every website on multisite environment
Different ads on every website on multisite environment
Different ads on every website on multisite environment
Ads Only at one website inside multisite network – code error
You can do something like this : // remove the script from the queue if were are on the post ID 11 add_action(‘wp_enqueue_scripts’, ‘remove_script_specific_post’); function remove_script_specific_post(){ if( 11==get_the_ID() ){ wp_dequeue_script(‘my_script_handle’); } } Provided that the script has been added with wp_enqueue_script
I don’t believe the code worked what you have posted. If you simply copied and pasted it from your template, it would never have worked. There are a couple of syntax errors/bugs in your code <?php if((have_posts)): ?> should be <?php if(have_posts()): ?>. <?php $count ?> What does this mean. This is suppose to update … Read more
The advertisements are only displayed on the Front-end of your site (whatever the visitors see). Since the ads are only displayed on the front-end, you don’t have to worry about generating invalid impressions by reloading your admin page, creating posts, etc. So long as you don’t open your website’s front-end area and start reloading like … Read more
I looked for one of these recently, as I have seen them, but I believe they are only bundled with some commercial themes. I ended up making one using CPT’s and jQuery Tools, it was pretty simple. The steps, Create a CPT with only the featured image upload ( to keep ad size to 175px … Read more
I’m absolutely guessing here, but you may want to put your code between: <?php if ( get_option(‘wap8_post_rel’) == ‘true’ ) { locate_template( ‘/includes/relatedposts.php’, true, true ); } ?> // these are your related posts and <?php comments_template( ”, true ); ?> //these are the comments
For your first question “Detect where they are coming from”, Just check the $_SERVER[‘HTTP_REFERER’] for your expected web address. For the second “Create a short lived page”, your answer lies in the set_transient() method. You can do something like: function create_page() { if ( get_current_user_id() ) return “<html>…</html>”; return false; } function get_page( $unique_id ) … Read more
I think that your proposed solution, or plan of attack, is far more complicated than it needs to be. You can use a static variable to manage this. Proof of concept: function shortcode_with_static_data($atts,$content) { static $ids; $ids[] = time(); var_dump($ids); // you should return a string not dump data in a real shortcode } add_shortcode(‘scwsc’,’shortcode_with_static_data’); … Read more
You have attempted to paste your PHP into a text widget. and the tags have been transformed. <div class=”textwidget”> <!–?php if (is_category(‘5′)) { ?–> You can’t execute PHP from a text widget by default, and I would not recommend trying to do so (it should be possible). Instead, it is trivial to build your own … Read more