Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter M J

    (@m2j)

    Ok, this one was figured out.

    Steps taken to troubleshoot.

    1. Enable DEBUGoption in wp-config.php
    2. Error was displayed on front end. Was a MySQL permissions error that would not allow writing to the /tmp directory
    3. Needed to chownthe /tmp directory to the correct user to allow WordPress to access the directory.

    Forum: Fixing WordPress
    In reply to: If statement error
    Thread Starter M J

    (@m2j)

    bah… nevermind – figured it out… I forgot to close the if statements lol

    sorry – it has been a long day…

    fixed code:

    <?php if ( is_page('page1')){ ?>
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/backgrounds/image1.jpg" class="bg" align="middle" />
    <?php } ?>
    <?php if ( is_page('page2')){ ?>
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/backgrounds/image2.jpg" class="bg" align="middle" />
    <?php } ?>
    <?php if ( is_page('page3')){ ?>
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/backgrounds/image3.jpg" class="bg" align="middle" />
    <?php } else { ?>
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/backgrounds/default.jpg" class="bg" align="middle" />
    <?php } ?>

    Hey guys,

    I have the same problem with the overlapping images. Could you guys please let me know how to fix it?

    I looked at this page: https://masonry.desandro.com/demos/infinite-scroll.html

    And got the following code from the source:

    $(function(){
    
        var $container = $('#container');
    
        $container.imagesLoaded(function(){
          $container.masonry({
        	itemSelector : '.item',
        	columnWidth : 310,
    		isAnimated: true
          });
        });
    
        $container.infinitescroll(
          // trigger Masonry as a callback
          function( newElements ) {
            // hide new items while they are loading
            var $newElems = $( newElements ).css({ opacity: 0 });
            // ensure that images load before adding to masonry layout
            $newElems.imagesLoaded(function(){
              // show elems now they're ready
              $newElems.animate({ opacity: 1 });
              $container.masonry( 'appended', $newElems, true );
            });
          }
        );
    
      });

    I removed the infinite scroll selectors from the code since I assume the plug-in already takes care of that.

    I’m pretty new to Javascript, so your help and patience would be greatly appreciated!

    Thank you in advance.
    – Mahan

    Forum: Fixing WordPress
    In reply to: 100% height issue
    Thread Starter M J

    (@m2j)

    would you mind explaining why that’s the case? and whether there is a work around?

    the main problem is that I have content in the footer that I want visible and if i set a min-height, it will put it all down way too far one pages that have minimal content.

    i found the jquery plugin the theme developer used to make the tiles collapse: https://desandro.com/demo/masonry/docs/ and I have a feeling the solution will be in there, but my level of understanding of javascript is minimal so any help would be appreciated!

    thanks!
    -mj

    Forum: Fixing WordPress
    In reply to: 100% height issue
    Thread Starter M J

    (@m2j)

    any thoughts? anyone?

    Thread Starter M J

    (@m2j)

    figured it out – it just wasn’t working on my laptop + xampp for some reason. it actually does work on my actual server though. good stuff!

    Thread Starter M J

    (@m2j)

    i figured it out… i accidentally had img tags with sizes that over lapped the image sizes outlined in wordpress.

    thanks for your help anyways.

    cheer,
    mj

    I’m wondering the same thing… can someone please help us out?

    Thread Starter M J

    (@m2j)

    Figured it out… finally. Here’s the solution for anyone else that may have the same problem.

    I installed the following plug-in: https://www.ads-software.com/extend/plugins/elevate-parent-category-template/ along with the code above and it works fine so far – sidebars are now on each category and their children as required!

    Thread Starter M J

    (@m2j)

    Update: This code seems to work… but for some reason it’s not working for double digit categories. So for example, it works for single digit categories such as “1” or “2” but not for double digit categories such as “11” or “12”.

    Can anyone please offer a solution or at least let me know why this is?

    Thanks in advance.

    <?php get_header(); ?>
    
    <?php
    if ( in_category( '3' ) || post_is_in_descendant_category( 3 ) ) {
    get_sidebar('projects');
    }
    else {
    get_sidebar('news');
    }
    ?>
    Thread Starter M J

    (@m2j)

    Sorry… wrong code – this is actually what I’m using:

    <?php
    if ( is_category('16') || $post->post_parent == '16' ) {
    get_sidebar('people');
    }
    if ( is_category('4') || $post->post_parent == '4' ) {
    get_sidebar('news');
    }
    if ( is_category('3') || $post->post_parent == '3' ) {
    get_sidebar('projects');
    }
    else {
    get_sidebar('news');
    }
    ?>
    Thread Starter M J

    (@m2j)

    Great, thanks for the info!

Viewing 12 replies - 1 through 12 (of 12 total)