How to convert that page to a wordpress template? [closed]
ok, i found the answer: In thumbs.php change ../images and ../thumbs to ../wp-content/themes/YOURTHEMENAME/images, ../wp-content/themes/YOURTHEMENAME/thumbs. Same in js.
ok, i found the answer: In thumbs.php change ../images and ../thumbs to ../wp-content/themes/YOURTHEMENAME/images, ../wp-content/themes/YOURTHEMENAME/thumbs. Same in js.
Rather than adding a class, just add a second selector to your .current_menu_item style of .home .menu-item-225. Not ideal, but for a single case, I think it’s completely appropriate. (This assumes that you’re using body_class() on your <body> element, but you should be doing that anyway.)
If you need to add it in the head, then this might help you: <?php add_action(‘wp_head’, ‘add_attr’); function add_attr(){ ?> <script data-cfasync=”false” type=”text/javascript” src=”http://use.typekit.com/YOUR-KIT-ID.js”></script> <script data-cfasync=”false” type=”text/javascript”>try{Typekit.load();}catch(e){}</script> <?php } ?> Make sure your theme has the wp_head function call. You’ll need wp_enqueue_scripts or wp_register_scripts only if your JS code in in some other .js file … Read more
Pretty simple fix, from what I can tell.. after each “loop” you need to reset your term list.. $term_list=””;
I figured it out finally, for some reason using the $ in my script just doesnt work so I had to use jQuery instead like this <script type=”text/javascript”> jQuery(document).ready(function() { jQuery(“#fittext3”).fitText(1.8, { minFontSize: ’12px’, maxFontSize: ’75px’ }); }); </script>
Put everything between <script> & </script> in a separate file. Then use wp_enqueue_script with the correct path of the file & dependencies to false. After that you can use only <a href=”https://twitter.com/share” class=”twitter-share-button”>Tweet</a> to add the tweet button.
To test if a user is logged in use is_user_logged_in(). To redirect a visitor use wp_redirect($location, $status = 302). You can combine both: <?php $location = ‘http://localhost’; if ( is_user_logged_in() ) $location = admin_url( “https://wordpress.stackexchange.com/” ); wp_redirect( $location ); In JavaScript (sort of): add_action( ‘wp_footer’, ‘wpse_73701_button’ ); function wpse_73701_button() { $location = is_user_logged_in() ? admin_url( … Read more
As for me, in WP I always use jQuery instead noConflict mode, Try to run this code: http://jsfiddle.net/GKmvA/1/
You can track the state of the youtube video, do you have the link to the youtube video? Use this youtube API function to get the result, and if it hits you back with a “0” you can initiate the alert(); function player.getPlayerState():Number Returns the state of the player. Possible values are unstarted (-1), ended … Read more
Here’s a potential solution using the page_link filter and testing for the presence of a meta key to add a query arg: function wpa84303_page_query_arg( $permalink, $page, $sample ) { if( $query_arg = get_post_meta( $page, ‘query_arg’, true ) ) $permalink = add_query_arg( ‘id’, ‘0’, $permalink ); return $permalink; } add_filter( ‘page_link’, ‘wpa84303_page_query_arg’, 10, 3 ); Add … Read more