different contents and same sidebar approach?
different contents and same sidebar approach?
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
get_footer not working boilerplate theme
Well guys, I ended up doing something like this which I am certain isn’t the best way. Seems like a lot of work just to get to the nugget. Could’ve sworn I’ve seen a simpler way but it’s escaped me all day. This is ugly and probably highly inefficient but it works. Please do let … Read more
How to add navigation in footer like StackExchange?
You need to run the content through do_shortcode() – at the moment you’re just echo’ing the raw post content, so nothing gets parsed. echo do_shortcode( $content->post_content ); However, you might be better off implementing a proper “loop” and using the_content() template tag – doing so will ensure everything runs “as normal” (firing all the typical … Read more
A very simple experiment… add_action(‘admin_init’,’get_header’); add_action(‘admin_init’,’get_footer’); … will demonstrate that the get_header() and get_footer() functions work on the back end as well as the front, though you will need to adjust for numerous markup problems and other issues. Honestly, you question seems to be “how do I get the site header and footer and use … Read more
I actually ran into a similar issue yesterday. A theme I was working with was adding 500+ lines of internal styles to the header which absolutely drives me nuts! I ended up finding a clever solution online to work around this which you could use for CSS. The JavaScript side I’ll explain toward the bottom. … Read more
I solved this by adding the header php code, and the setting it with display none as below: #main-header { display:none; } Then using JQuery I added the following: <script> if(self==window.top) { $( “header#main-header” ).css( “display”, “inherit” ); $( “div#mce_height” ).css( “margin-top”, “100px” ); } </script> This detects if it is in an iframe, and … Read more