navyspitfire
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Adding to wp_footerSolved. Needed to place <?php wp_footer(); ?> in my footer.php file.
Forum: Fixing WordPress
In reply to: wp_enqueue & youtube API on different templatesSolved. Needed to place <?php wp_footer(); ?> in my footer.php file.
Forum: Fixing WordPress
In reply to: Adding to wp_footerIs there any reason this wouldn’t work?
add_action ( 'wp_enqueue_scripts', 'dtrou_youtube_api' ); function dtrou_youtube_api() { wp_register_script( 'dtrou-youtube', get_template_directory_uri() . '/js/youtube_js.js', array('jquery'), '', true ); wp_register_script( 'youtube-subscribe-btn', 'https://apis.google.com/js/plusone.js', array(), '', true ); wp_register_script( 'youtube-subscribe-featured', 'https://gdata.youtube.com/feeds/users/droptroucomedy/uploads?alt=json-in-script&callback=vidinfolist&max-results=1', array(), '', true ); wp_register_script( 'youtube-subscribe-videos', 'https://gdata.youtube.com/feeds/users/droptroucomedy/uploads?alt=json-in-script&callback=vidinfolist&max-results=100', array(), '', true ); if ( is_page_template('t-featured.php') ) { wp_enqueue_script('dtrou-youtube'); wp_enqueue_script('youtube-subscribe-featured'); wp_enqueue_script('youtube-subscribe-btn'); } if ( is_page_template('t-videos.php') ) { wp_enqueue_script('dtrou-youtube'); wp_enqueue_script('youtube-subscribe-videos'); wp_enqueue_script('youtube-subscribe-btn'); } }
Forum: Fixing WordPress
In reply to: Adding to wp_footerWhy wouldn’t I want to do
wp_register_script?
?Forum: Fixing WordPress
In reply to: Adding to wp_footerEssentially I make a script.js file and add it into my /js/ folder?
Then I add that into my functions.php file? ‘my_js_file’ I would name whatever, and ‘my-js’ would be the filename?
How would I execute it then?
Forum: Hacks
In reply to: Target only pages in the same categoryIs this the right step?
<div class="port-nav left"> <?php /** * Infinite next and previous post looping in WordPress */ if( get_adjacent_post(true, '', true) ) { ?> <p class="prev"><?php previous_post_link('%link', '', true ); ?></p> <?php } else { $first = new WP_Query('posts_per_page=1&order=DESC'); $first->the_post(); echo '<a href="' . get_permalink() . '">← Previous Post</a>'; wp_reset_query(); }; ?> <?php if( get_adjacent_post(true, '', false) ) { ?> <p class="next"><?php next_post_link('%link', '', true ); ?> <?php } else { $last = new WP_Query('post_type=page&posts_per_page=1&order=ASC'); $last->the_post(); echo '<a href="' . get_permalink() . '">Next Post →</a>'; wp_reset_query(); }; ?> </div>
I’m not sure how to input a category argument in the post queries.
Forum: Fixing WordPress
In reply to: Next post/prev post link image rolloverThanks for the help, a simple text-indent: -999px; works great.
Forum: Fixing WordPress
In reply to: Plugin error creates WSODJust deleted the plugin.
Forum: Fixing WordPress
In reply to: Next post/prev post link image rolloverNope, images disappear.
Forum: Plugins
In reply to: [WP-PageNavi] Replace 'text for prev/next page' with imagesDoesn’t work; it seems that there has to be some text in the ‘text for…’ boxes or else the classes won’t appear.
Forum: Fixing WordPress
In reply to: Next post/prev post link image rollover<div class="port-nav left"> <p class="prev"><?php previous_post_link('%link'); ?></p> <p class="next"><?php next_post_link('%link'); ?></p> </div>
.next a:link { background: url(/wp-content/themes/starkers-child/img/RightArrow_Idle.png) no-repeat; display: block; width: 29px; height: 29px; } .next a:hover { background: url(/wp-content/themes/starkers-child/img/RightArrow_RollOver.png) no-repeat; display: block; } .prev a:link { background: url(/wp-content/themes/starkers-child/img/LeftArrow_Idle.png) no-repeat; display: block; width: 29px; height: 29px; } .prev a:hover { background: url(/wp-content/themes/starkers-child/img/LeftArrow_RollOver.png) no-repeat; display: block; }
So I got the link/hover to work, except that the html %link name displays on top of the image. Is there anyway to hide the actual link name?
Forum: Fixing WordPress
In reply to: Next post/prev post link image rolloverNope, not working. Image path is correct; I can see it load underneath the image, though, and not on top. I tried this code but couldn’t get it to work. Any thoughts?
.port-nav { margin: 2em 0 0 0; position: relative; } .port-nav .next:hover { background: url(/wp-content/themes/starkers-child/img/RightArrow_RollOver.png) no-repeat; display: block; position: absolute; z-index: 999; }
Forum: Fixing WordPress
In reply to: Reading Settings problemCool, got it. Thanks.
Forum: Fixing WordPress
In reply to: Featured image link to pageCool I’ll save that. I got some assistance and figured out a way to do it. Also, thank link doesn’t link to anything for me.
Forum: Fixing WordPress
In reply to: Menus, Nav, and LinkingOkay, got it to work. I followed both Method 1 + 2, but 2 is what got it working.
https://www.sutanaryan.com/wordpress/wordpress-custom-permalink-not-working-in-localhost/