larsemerson
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Ascend] get_posts() causing re-load of posts after post?No worries — over the last couple months I have tried all of those things (and before). I downloaded an entirely new browser too and still the same issue.
Forum: Themes and Templates
In reply to: [Ascend] Getting rid of “read more” from excerptThat worked wonders, using both functions, thank you!
Forum: Themes and Templates
In reply to: [Ascend] get_posts() causing re-load of posts after post?I do but turning that off does not resolve the issue either. Is it that there are two “load_posts()” queries running?
Forum: Themes and Templates
In reply to: [Ascend] get_posts() causing re-load of posts after post?Hi @hannahritner — yeah it looks like this is still going on, no help with the plugin deactivation. If you load the front page you can see it happen.
Forum: Fixing WordPress
In reply to: Admin bar at top (when looking at site) flickeringThat didn’t seem to fix it — tried disabling all the plugins and it has been consistent across themes.
Forum: Fixing WordPress
In reply to: Can no longer install plugins, 500 errorHere’s the debug.log file I have at the moment:
[28-Feb-2019 02:34:41 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 3 [28-Feb-2019 02:34:41 UTC] PHP Notice: Undefined variable: post_id in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 4 [28-Feb-2019 02:34:41 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 6 [28-Feb-2019 02:34:41 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 7 [28-Feb-2019 02:34:41 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 12 [28-Feb-2019 02:34:41 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 13 [28-Feb-2019 02:34:42 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 32 [28-Feb-2019 02:34:42 UTC] PHP Notice: Trying to get property of non-object in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 33 [28-Feb-2019 02:57:32 UTC] PHP Notice: Undefined variable: post_id in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/plugins/facebook-thumb-fixer/output-logic.php on line 4 [28-Feb-2019 02:57:32 UTC] PHP Notice: Undefined offset: -1 in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-includes/post-template.php on line 287 [28-Feb-2019 02:57:33 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:10:54 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:11:20 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:11:20 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:11:20 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:11:20 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10 [28-Feb-2019 03:11:20 UTC] PHP Notice: Use of undefined constant Home - assumed 'Home' in /home/content/p3pnexwpnas14_data02/84/41930284/html/wp-content/themes/lovecraft/functions.php on line 10- This reply was modified 7 years, 3 months ago by larsemerson.
Forum: Fixing WordPress
In reply to: Can no longer install plugins, 500 errorGot it – where do I check my error log? I did try deactivating all plugins, trying to download, but that did not fix it.
Forum: Fixing WordPress
In reply to: Implementing this mapAdditional follow-up, so it looks like the script I’m enqueing is only for the admin? Other users can’t see the “click” functionality, only when I’m logged in as the admin does it work.
Forum: Fixing WordPress
In reply to: Implementing this mapAll right – got it looking really good, coming back to you because I think a brief change will require the javascript to change as well. How would I:
1. Make the “info-box” always displayed above the map
2. Get the “info-box” to be filled with the content from the state that was last clicked on, and that state is highlighted a slightly different color
3. So that when you click on another state then it changes the content (though not the size of the info-box)I think this is a mix of CSS and JS, right? I’d have to switch out some of the hovers for “click” right? But even though I did that for the first element I can’t get it to stay steady.
Forum: Fixing WordPress
In reply to: Implementing this mapYES! http://thepostrider.com/testing-page/ That worked! Finally it’s up, just a bit askew and oddly positioned – but I imagine that can’t be too hard to fix with some <br> tags, etc. – and the hover overs are showing up all over the place, but I’m sure that can’t be too complicated.
Thank you, thank you! Sorry for all the back and forth, but greatly appreciated! 😀
- This reply was modified 7 years, 7 months ago by larsemerson.
Forum: Fixing WordPress
In reply to: Implementing this mapGood to hear I’m getting close! Okay so I found the SVG from this page, https://upload.wikimedia.org/wikipedia/commons/1/1a/Blank_US_Map_%28states_only%29.svg trying to link to it, I put it in as the link instead of the w3.org link in the
xmlns:svg="http://www.w3.org/2000/svg"part of the <svg> tag (is that correct?). Now the page is just a 500 error – http://thepostrider.com/testing-page/If I take the code out of the .php file it goes back to normal. Do I need to put <html> codes around the text in question after the
<?php the_content(); ?>? That didn’t seem to fix it, but it definitely seems that it’s something that needs fixed on the template page, instead of with just the SVG file, right?Forum: Fixing WordPress
In reply to: Implementing this mapOkay, probably best to just create a new page template – now I created a new page template based off of another page template, set the page to that template, where can I add the HTML in the template (I presume I should still remove the script source)?
Still on: http://thepostrider.com/testing-page/
See page template code below:
<?php /* Template Name: Map page template */ get_header(); ?> <?php get_header(); ?> <div class="wrapper section"> <div class="section-inner"> <div class="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class( 'post single' ); ?>> <div class="post-inner"> <div class="post-header"> <h1 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> <!-- <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?> <div class="post-meta"> <?php edit_post_link( __( 'Edit', 'lovecraft' ), '<p>', '</p>' ); ?> </div> <?php endif; ?> --> </div><!-- .post-header --> <?php if ( get_the_content() ) : ?> <div class="post-content"> <?php the_content(); ?> </div> <div class="clear"></div> <?php endif; ?> </div><!-- .post-inner --> <?php comments_template( '', true ); ?> </div><!-- .post --> <?php endwhile; endif; ?> </div><!-- .content --> <?php get_sidebar(); ?> <div class="clear"></div> </div><!-- .section-inner --> </div><!-- .wrapper.section --> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: Implementing this mapI got rid of the HTML tag – I did just put it directly into the text editor of the page editor. Is there a better way? I’m confused as it’s working in the link I took the text from, minus the script source stuff you noted I should remove – why wouldn’t it work here?
Forum: Fixing WordPress
In reply to: Implementing this mapOkay so I think I was able to fix that by just switching my function to (just specifying exactly where the file is):
add_action('wp_enqueue_scripts', 'my_enqueue'); function my_enqueue() { wp_enqueue_script( 'my_js', '/wp-content/themes/lovecraft/main.js', array('jquery')); }Now it looks like it’s loading main.js correctly on the page, but the console errors I’m getting now are:
“Uncaught TypeError: $ is not a function
at VM504 main.js:1”In reference to the main.js file (which my content is all of exactly from the post above). I get the feeling this is related to that no conflict wrapper you mentioned earlier, so I wrapped `(function( $ ) {
“use strict”;
<all the javascript from main.js here>
})(jQuery);`
Now it looks like the console errors are gone – but still no map.
My apologies for dragging this along – I’m quite new to this but very excited to get the map working, and learning plenty along the way! 🙂
- This reply was modified 7 years, 7 months ago by larsemerson.
- This reply was modified 7 years, 7 months ago by larsemerson.
- This reply was modified 7 years, 7 months ago by larsemerson.
Forum: Fixing WordPress
In reply to: Implementing this mapThank you! Great that loaded into the functions.php document – now trying to load the testing page the map is not displaying and I am getting this error:
“GET http://thepostrider.com/wp-content/themes/lovecraft/style.cssmain.js?ver=4.9.8&nocache=1 404 (Not Found)”
It looks like this is related to the main.js file, which has the following:
$("path, circle").hover(function(e) { $('#info-box').css('display','block'); $('#info-box').html($(this).data('info')); }); $("path, circle").mouseleave(function(e) { $('#info-box').css('display','none'); }); $(document).mousemove(function(e) { $('#info-box').css('top',e.pageY-$('#info-box').height()-30); $('#info-box').css('left',e.pageX-($('#info-box').width())/2); }).mouseover(); var ios = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; if(ios) { $('a').on('click touchend', function() { var link = $(this).attr('href'); window.open(link,'_blank'); return false; }); }