gswartz
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress Leads] script breaking in safariThat did it. Thanks so much!
Forum: Plugins
In reply to: [WordPress Leads] script breaking in safariThanks for the quick update. That took care of the invalid date error but we’re now getting another error – ReferenceError: Can’t find variable: trackObj
Forum: Plugins
In reply to: [WordPress Leads] script breaking in safariWell we noticed it first on iPhone iOS7 but also getting the same issue on my MBP – v 7.0 (9537.71). Thanks!
Forum: Fixing WordPress
In reply to: change home page sortingI found this – http://wordpress.org/support/topic/change-loop-to-order-posts-by-views and it “seems” to work but not quite. I am getting posts with the larger views at the top but then I have posts with smaller views interspersed. You can see how it’s working here – http://support.topechelon.com And here’s the code I’m using. Notice there’s a section that shows the number of views in the code. It’s calling a function that returns get_post_meta($pid,’post_viewed_count’,true) which is what the args also order by, so I would think my number of views would decrease per row instead of going from 514 to 154 to 40 to 185.
<?php $paged = intval(get_query_var('paged')); ?> <?php $paged = ($paged) ? $paged : 1; ?> <?php $args = array( 'orderby' => 'post_viewed_count', 'order' => 'ASC', ); ?> <?php query_posts($args); ?> <!-- ****** END ORDER BY VIEWS STUFF --> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ ?> <div class="entry"> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <div class="views"><?php echo user_post_visit_count($post->ID);?> Views</div><div class="categories"><?php the_category(', '); ?></div> </div> <?php endwhile; ?>Forum: Hacks
In reply to: sidebar widgets errorI figured out the problem. I was taking the elements and putting them inside the post form. When comparing the generated code before I did the manipulation and after, I realized that the original had all of the page options (editor, title, sidebars, widgets) outside the post form. I just changed the jquery from $(“#post”).append(newcontent) to $(newcontent).insertAfter(“#post”) and it’s all working now. Hopefully this will be helpful for anyone else doing page editor customization.
So apparently I missed the_content() in the loop. For anyone else having an issue, this code works.
<div id="dvContactRight"> <div class="contacttitle">Send a Message</div> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; endif;?> </div>Even with a loop, I’m still not getting the content.
<div id="dvContactRight"> <div class="contacttitle">Send a Message</div> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); endwhile; endif;?> </div>Full code here – http://pastebin.com/7DmhgZFn
What input fields have I added? For the page content I have the following…
test [contact-form-7 id="99" title="Contact form 1"]What’s wrong with that?
Woops, sorry bout the code & forum rules violation. Here’s the pastebin version – http://pastebin.com/1n8qxWtr
Okay, but even with the_content(), I’m not getting anything. I’ve even put in some text before the form to see if I get that and no, I don’t get that either.
I’m new to wordpress and all of this, so here’s my template. Anyone see a problem with it that would cause this?
[Code moderated as per the Forum Rules. Please use the pastebin]
Not initially. I had echo
$post->post_content. However, if I use<?php the_content(); ?>or<?php $post->post_content; ?>it just displays nothing.I just created a page that uses a template other than the default. In this case the form does not show up. The page that does use the default template does display the form. So, now I’m thinking it’s not a page vs. post issue but the default template vs. a custom one. Any ideas?