Sliding pages + wordpress [closed]

This is what came to mind though there could be some easy implementations as well: jQuery(document).ready(function(){ jQuery(document).scroll(function(){ if(jQuery(document).scrollTop()>0){ jQuery(‘#first-header’).hide(); jQuery(‘#second-header’).show(); } else{ jQuery(‘#second-header’).hide(); jQuery(‘#first-header’).show(); } }) })

Using jQuery .after inside loop

WordPress requires no-conflict for jQuery. Change this: var tiles = $(‘#article-tile:nth-child(‘+adLoc+’)’); $(tiles).after(adTile); …to this: var tiles = jQuery(‘#article-tile:nth-child(‘+adLoc+’)’); jQuery(tiles).after(adTile); Or else wrap your entire script accordingly: jQuery(document).ready(function($) { // $() will work as an alias for jQuery() inside of this function });

Iteratively add sub shortcodes to php array

Your data structure appears to be very list like. The reason you’re running into difficulties is because you’re trying to fix a fix, which is never a good thing. Instead I would suggest you seek alternative solutions to your problem. For example, instead it would be more logical to use something like: <ul class=”component”> <li>content … Read more

Split the content of the_content();

I am guessing, at least partially, but it sounds like the FaceBook content is loaded as a filter on the_content, which you run on both blocks of content. The quick fix, keeping most of your code intact, would be to remove the FaceBook filter for the first array, then put it back for the second. … Read more

How can I call a specific file (via php) by referencing the logged-in username?

Try to do this: <?php global $current_user;?> <?php if(is_user_logged_in()) :?> <?php get_currentuserinfo();?> <?php if(is_array( $current_user->roles ) && in_array( ‘map_user’, $current_user->roles ) ) : ?> <div id=”mapContent”> <?php require(“/mapping/”.$current_user->user_login.”.html/”); ?> </div> <?php endif; ?> <?php endif; ?> Source codex.wordpress.org