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

How to exclude the word “class” from being matched in search?

You might try to use the posts_search filter as elegantly suggested by @Kaiser in the first link you provided. Here is one idea: function filter_search($sql){ global $wpdb; if( strpos(get_query_var(“s”),”lass”) !== false AND strpos(get_query_var(“s”),”class”) === false ){ $sql .= ” AND {$wpdb->posts}.post_title NOT LIKE ‘%class%'”; $sql .= ” AND {$wpdb->posts}.post_content NOT LIKE ‘%class%'”; } return $sql; … Read more

Two different pages that share the same content?

Have you take a look at Options Page Add-on for Advanced Custom Field? http://www.advancedcustomfields.com/add-ons/options-page/ I created an option page for my client once where they enter promotion content once in that options page, and display that same information elsewhere via widget, shortcode, and PHP functions. It costs 25AUD but it’s unlimited license and is well … Read more