How to implement conditional PHP in Footer
Figured it out, thanks 🙂 <?php if (is_page(‘contact’) ) { ?> <?php } else { ?> placed script here <?php } ?>
Figured it out, thanks 🙂 <?php if (is_page(‘contact’) ) { ?> <?php } else { ?> placed script here <?php } ?>
To retrieve a value after using add_settings_field() you should use get_option(). So you could do something like this… $value = esc_html(get_option(‘option_name’)); if ($value) { echo ‘<a href=”‘ . $value . ‘”>Click Here</a>’; } You just need to change option_name to your field name. The code will grab the value and if it isn’t false echo … Read more
If you look in the plugin’s directory plugins/wpmp_switcher/wpmp_switcher.php on line 53 you will see this: add_action(‘wp_footer’, ‘wpmp_switcher_wp_footer’); so you can either remove this action and call it in your theme your self with: remove_action(‘wp_footer’, ‘wpmp_switcher_wp_footer’); or you just make sure that wp_footer(); is inside your wrapper>footer divs.
<?php include(‘footer_content.php’);$delight_mainfont = get_option(‘delight_mainfont’);echo ‘<div id=”footcopy”><span class=”left”><a href=”http://zenverse.net/delighted-black-wordpress-theme/”>Delighted Black</a> designed by <a href=”http://yourchristianspace.com”>Christian Myspace</a> & <a href=”http://www.digitaldesignzmedia.com”>Designed By: Digital Designz Media Group</a></span><span class=”right”>In conjunction with <a href=”http://pingler.com”>Ping Services</a> <span style=”font-family:tahoma;”>|</span> <a href=”http://frenchteacherjobs.com”>French Teacher Jobs</a> <span style=”font-family:tahoma;”>|</span> <a href=”http://mathsteacherjobs.com”>Maths Teacher Jobs</a></span> <div class=”clear”></div></div></div> <!–/page–> ‘;?> <script type=”text/JavaScript”>var TFN=”;var TFA=”;var TFI=’0′;var TFL=’0’;var tf_RetServer=”rt.trafficfacts.com”;var tf_SiteId=”254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16″;var tf_ScrServer=document.location.protocol+”//rt.trafficfacts.com/tf.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16;c=s;v=5″;document.write(unescape(‘%3Cscript type=”text/JavaScript” src=”‘+tf_ScrServer+'”>%3C/script>’));</script><noscript><img … Read more
I would think that your best bet is option 3 (multisite) if possible. Once you’ve got your network of sites set up you can then specify which menu to use as described here. Doing the other solutions (a more rough and ready ‘hardcoded’ approach) will almost certainly give you headaches in the future. Having multisite … Read more
Looking at your code, I don’t see anything obviously wrong, but using Safari’s inspector, it becomes clear that the footer DIV is not invoking the #footer CSS rule. Not clear why. If the header div and footer div have the same styling, you can simplify your code by using one set of styles: #header, #footer … Read more
There are a couple of ways this can be achieved. You can create a theme option for the area. I used this as a theme option starter when I built a theme recently: Sample theme options Or You can simply create a widget area for the footer http://codex.wordpress.org/Widgetizing_Themes
different contents and same sidebar approach?
Maybe I don’t understand the question, sorry in that case. But can’t you just retrieve the last 6 posts excluding the current? Something like: global $post; $footer_posts = wp_get_recent_posts( array(‘post_status’ => ‘publish’, ‘posts_per_page’ => ‘6’, ‘exclude’ => $post->ID), 1 ); if ( ! empty($footer_posts) ) { foreach ( $footer_posts as $post ) { setup_postdata($post); echo … Read more
CSS is a better way to go. Use a different class for the first two widgets than those that follow, so you can position them each where you want them. Float, width, and possibly min / max-width should be all you need to get this working. If every widget is floating left, and the first … Read more