eweisbrot
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display recent posts in multiple separate div's on same pageWordPress is not installed on the dev server I linked to, but I’m calling the “wp-blog-header.php” from our live server where WP is installed at the top of the page.
Let me post the code here so I can offer more detailed as to what my issue is (see below). The first div is getting the recent post properly. However, when I try to use the same code in the second div, it causes a 500 error and I’m not sure how to use multiple loops (I tried reading the WP documentation but couldn’t quite grasp it).
<div class="col-md-6"> <article> <?php global $post; $args = array( 'posts_per_page' => 1 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <div class="date"> <span class="day"><?php the_time('jS'); ?></span> <span class="month"><?php the_time('M, Y'); ?></span> </div> <h4> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><br /> <?php endforeach; ?> </h4> <p> <?php the_excerpt_max_charlength(140); function the_excerpt_max_charlength($charlength) { $excerpt = get_the_excerpt(); $charlength++; if ( mb_strlen( $excerpt ) > $charlength ) { $subex = mb_substr( $excerpt, 0, $charlength - 5 ); $exwords = explode( ' ', $subex ); $excut = - ( mb_strlen( $exwords[ count( $exwords ) - 1 ] ) ); if ( $excut < 0 ) { echo mb_substr( $subex, 0, $excut ); } else { echo $subex; } echo '...'; } else { echo $excerpt; } } ?> </p> </article> </div> <div class="col-md-6"> <article> <div class="date"> <span class="day">15</span> <span class="month">Jan</span> </div> <h4><a href="blog-post.html">Lorem ipsum dolor</a></h4> </article> </div>
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressI created a new thread. Please see here:
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressSince you can’t remove the link, do you have any insight into the issue I’m facing?
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressWhy is it an issue to remove the link to our dev website? Everything else will remain the same and I will provide more detail as to what the issue is I’m trying to fix.
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressThe product isn’t currently ready for launch, but is accessible via the link. We want to keep the product confidential until it’s ready for launch and don’t want it accessible by humans or search engines. This was an oversight on my part. If you remove the link, I can provide more details as to what my issue is regarding the WP code.
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressHello,
Could WordPress support please delete the link I provided in my first post? I posted the link not realizing it’s not a good idea for security issues (as the link points to a new website/software product in development). Thanks!
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressI also figured that issue out on my own, as it wasn’t inside the loop. However, I have found another issue! I’d like to have the recent posts displayed. However, each section that I’d like to display recent posts has it’s own div section, and when I try to copy/paste the same code that I’m currently using for the recent post that’s working “Introducing the Surety Cloud”, it causes and error. I’m assuming you can’t have the code replicated, but I’m not sure how else to do this. Any thoughts?
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressI tried using the code below…but it didn’t work:
<?php the_time(‘F j, Y’); ?>
Forum: Fixing WordPress
In reply to: Can't Integrate External Website w/ WordPressNevermind…I figured out that a period was missing in front of the file path.
SO I have the last blog post displayed now. However, I’m not sure how to display the post date and snippet like the static code next to the “Introducing the Surety Cloud” post. Does anyone know the php needed to do this? Thanks!
Forum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostWill do…thanks!
Forum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostThanks Andrew.
I tried implementing the JavaScript you mentioned and activated the plugin you suggested, but it still didn’t fix the issue. Since jQuery may be enqued improperly, how would I go about fixing this? I tried following the WP documentation on it, but couldn’t get it to work.
Forum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostYes, I believe it does. This is the code:
<script>// < ![CDATA[ // < ![CDATA[ $(function(){ if ($.cookie('modal_shown') == null) { $.cookie('modal_shown', 'yes', { expires: 1, path: '/' }); setTimeout(function(){ $('#modalPrintbond').modal('show'); }, 5000); } }); // ]]></script>
Sorry for the formatting..that was done by WP.
Forum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostHey Andrew,
The script you referenced above is not what I was trying to implement, but part of another script. I tried deactivating all plugins, but that didn’t fix the issue. Should I install the plugin to see if this fixes the issue?
Forum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostForum: Fixing WordPress
In reply to: Internal JavaScript Not Working in WP PostLet me know when a good time is for you, as I don’t want to leave it up for days. Thanks.