Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter BShurilla09

    (@bshurilla09)

    I was able to fix it, on line 26 of the dntly.php copy and paste this code in
    define( 'DNTLY_PLUGIN_PATH', plugin_dir_path(__FILE__) );

    Thread Starter BShurilla09

    (@bshurilla09)

    Ok, I was able to get it working! just had to add a missing colon in the walker function, here is the working walker:

    class SH_Child_Only_Walker extends Walker_Nav_Menu {  
    
        // Don't start the top level
        function start_lvl(&$output, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::start_lvl(&$output, $depth,$args);
        }  
    
        // Don't end the top level
        function end_lvl(&$output, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::end_lvl(&$output, $depth,$args);
        }  
    
        // Don't print top-level elements
        function start_el(&$output, $item, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::start_el(&$output, $item, $depth, $args);
        }  
    
        function end_el(&$output, $item, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::end_el(&$output, $item, $depth, $args);
        }  
    
        // Only follow down one branch
        function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {  
    
            // Check if element as a 'current element' class
            $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );
            $current_class = array_intersect( $current_element_markers, $element->classes ); 
    
            // If element has a 'current' class, it is an ancestor of the current element
            $ancestor_of_current = !empty($current_class);  
    
            // If this is a top-level link and not the current, or ancestor of the current menu item - stop here.
            if ( 0 == $depth && !$ancestor_of_current)
                return;  
    
            parent::display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output );
        }
    }

    Forum: Fixing WordPress
    In reply to: My blog appearance

    have you recently added any plugins? if so, start by disabling all plugins then slowly enable them again to see if that causes the issue.

    Thread Starter BShurilla09

    (@bshurilla09)

    ok, so in my header I now have this:

    <!-- begin #nav_main_wrap -->
    <div id="nav_main_wrap"><div id="nav_main">
     <?php wp_nav_menu( array('theme_location'=>'primary','depth' => 1) ); ?>
    <span class="clear">&nbsp;</span>
    </div></div>
    <!-- end #nav_main_wrap -->
    <!-- begin #nav_sub_wrap -->
    <div id="nav_sub_wrap"><div id="nav_sub">
    	 <?php wp_nav_menu( array('theme_location'=>'primary','walker' =>new SH_Child_Only_Walker(),'depth' => 0) ); ?>
    	<span class="clear">&nbsp;</span>
    </div></div>
    <!-- end #nav_sub_wrap -->

    Which is displaying the top level of the menu fine, the walker for the sub menu seems to still be keeping it completely hidden, here is the walker function code

    class SH_Child_Only_Walker extends Walker_Nav_Menu {  
    
        // Don't start the top level
        function start_lvl(&$output, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::start_lvl(&$output, $depth,$args);
        }  
    
        // Don't end the top level
        function end_lvl(&$output, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::end_lvl(&$output, $depth,$args);
        }  
    
        // Don't print top-level elements
        function start_el(&$output, $item, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::start_el(&$output, $item, $depth, $args);
        }  
    
        function end_el(&$output, $item, $depth=0, $args=array()) {
            if( 0 == $depth )
                return;
            parent::end_el(&$output, $item, $depth, $args);
        }  
    
        // Only follow down one branch
        function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {  
    
            // Check if element as a 'current element' class
            $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );
            $current_class = array_intersect( $current_element_markers, $element->classes ); 
    
            // If element has a 'current' class, it is an ancestor of the current element
            $ancestor_of_current = !empty($current_class);  
    
            // If this is a top-level link and not the current, or ancestor of the current menu item - stop here.
            if ( 0 == $depth && !$ancestor_of_current)
                return  
    
            parent::display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output );
        }
    }

    it would probably be easier to start with a boilerplate template that has all the essential files needed but no extra code..

    Thread Starter BShurilla09

    (@bshurilla09)

    ok, so I don’t really know anything about this, walker function, but I’ve added this and called it in the theme, and this is it but the only problem is that it is hiding all the main items as well, but due to my lack of understanding this I’m not sure about how to edit the walker to fix that.. here is the walker code-

    class Selective_Walker extends Walker_Nav_Menu
    {
        function walk( $elements, $max_depth) {
    
            $args = array_slice(func_get_args(), 2);
            $output = '';
    
            if ($max_depth < -1) //invalid parameter
                return $output;
    
            if (empty($elements)) //nothing to walk
                return $output;
    
            $id_field = $this->db_fields['id'];
            $parent_field = $this->db_fields['parent'];
    
            // flat display
            if ( -1 == $max_depth ) {
                $empty_array = array();
                foreach ( $elements as $e )
                    $this->display_element( $e, $empty_array, 1, 0, $args, $output );
                return $output;
            }
    
            /*
             * need to display in hierarchical order
             * separate elements into two buckets: top level and children elements
             * children_elements is two dimensional array, eg.
             * children_elements[10][] contains all sub-elements whose parent is 10.
             */
            $top_level_elements = array();
            $children_elements  = array();
            foreach ( $elements as $e) {
                if ( 0 == $e->$parent_field )
                    $top_level_elements[] = $e;
                else
                    $children_elements[ $e->$parent_field ][] = $e;
            }
    
            /*
             * when none of the elements is top level
             * assume the first one must be root of the sub elements
             */
            if ( empty($top_level_elements) ) {
    
                $first = array_slice( $elements, 0, 1 );
                $root = $first[0];
    
                $top_level_elements = array();
                $children_elements  = array();
                foreach ( $elements as $e) {
                    if ( $root->$parent_field == $e->$parent_field )
                        $top_level_elements[] = $e;
                    else
                        $children_elements[ $e->$parent_field ][] = $e;
                }
            }
    
            $current_element_markers = array( 'current-menu-item', 'current-menu-parent', 'current-menu-ancestor' );  //added by continent7
            foreach ( $top_level_elements as $e ){  //changed by continent7
                // descend only on current tree
                $descend_test = array_intersect( $current_element_markers, $e->classes );
                if ( !empty( $descend_test ) )
                    $this->display_element( $e, $children_elements, 2, 0, $args, $output );
            }
    
            /*
             * if we are displaying all levels, and remaining children_elements is not empty,
             * then we got orphans, which should be displayed regardless
             */
             /* removed by continent7
            if ( ( $max_depth == 0 ) && count( $children_elements ) > 0 ) {
                $empty_array = array();
                foreach ( $children_elements as $orphans )
                    foreach( $orphans as $op )
                        $this->display_element( $op, $empty_array, 1, 0, $args, $output );
             }
            */
             return $output;
        }
    }

    well, to get to the dashboard you would simply add /wp-admin to the end of the url you have- so, example: https://www.samplesite.com/wp-admin

    Thread Starter BShurilla09

    (@bshurilla09)

    anybody?

    Thread Starter BShurilla09

    (@bshurilla09)

    the <?php wp_head(); ?> was missing, thanks alot!!! and I do have 3.0.1

    Thread Starter BShurilla09

    (@bshurilla09)

    Did you upload imagerotator.swf ? Yes.
    Do you have any other picture or image plugins like simpleviewer? No
    Try to deactive the sildeshow flash player in the settings and then enable it again. Did Nothing.
    Are you using the newest version of Nextgen? Version 1.6.2

    Thread Starter BShurilla09

    (@bshurilla09)

    that worked ?? i just set the page to use a different template that linked to a different sidebar and that fixed it ?? thanks!

    Thread Starter BShurilla09

    (@bshurilla09)

    is there a way to put static text on the posts page?

    Thread Starter BShurilla09

    (@bshurilla09)

    ok, I got this code in

    <?php if( is_front_page() ) { ?>
            <?php if (have_posts()) : ?>
                   <?php while (have_posts()) : the_post(); ?>
        <li>
            <?php if (is_page() || is_single()) { ?>
            <h2 class="post-title"><?php the_title(); ?></h2>
            <?php } else { ?>
            <h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <?php } ?>
            <?php if((!is_page() or $options['metaenabled']) or $options['txtsizechange']) { ?>
            <div class="post-meta">
                <?php if(!is_page() or $options['metaenabled']) { ?>
                <div class="meta-left">
                </div>
                <?php } ?>
                <div class="meta-right">
                    <?php if(!is_page() or $options['metaenabled']) { ?>
                    <?php } ?>
                    <?php if((is_single() or is_page()) and $options['txtsizechange']) { ?>
                    <?php } ?>
                    <p class="changesize" onclick="changeFontSize()" title="Increase/Decrease font size"><span id="fontsmall">A</span> <span id="fontbig">A</span></p>
                    <input type="hidden" value="inc" name="fontoperation" id="fontoperation" />
                    <?php } ?>
                </div>
            </div>
        </li>
                   <?php endwhile; ?>
                   <?php endif; ?>
        <?php } ?>

    and the page loads fine, but It is not showing the posts..

    Thread Starter BShurilla09

    (@bshurilla09)

    here is the code with the fixes

    <?php if( is_front_page() ) { ?>
            <?php if (have_posts()) : ?>
                   <?php while (have_posts()) : the_post(); ?>
        <li>
            <?php if (is_page() || is_single()) { ?>
            <h2 class="post-title"><?php the_title(); ?></h2>
            <?php } else { ?>
            <h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <?php } ?>
            <?php if((!is_page() or $options['metaenabled']) or $options['txtsizechange']) { ?>
            <div class="post-meta">
                <?php if(!is_page() or $options['metaenabled']) { ?>
                <div class="meta-left">
                </div>
                <?php } ?>
                <div class="meta-right">
                    <?php if(!is_page() or $options['metaenabled']) { ?>
                    <?php } ?>
                    <?php if((is_single() or is_page()) and $options['txtsizechange']) { ?>
                    <p class="changesize" onclick="changeFontSize()" title="Increase/Decrease font size"><span id="fontsmall">A</span> <span id="fontbig">A</span></p>
                    <input type="hidden" value="inc" name="fontoperation" id="fontoperation" />
                    <?php } ?>
                </div>
            </div>
        </li>
                   <?php endwhile; ?>
                   <?php endif; ?>
        <?php } ?>

    And the error it gives me now
    “Parse error: syntax error, unexpected T_ENDWHILE in /home1/victosb9/public_html/wp-content/themes/vbbc-2.0/index.php on line 47”

    Thread Starter BShurilla09

    (@bshurilla09)

    Here is what I am putting in right before the div class “clear”

    <?php if( is_front_page() ) { ?>
            <?php if (have_posts()) : ?>
                   <?php while (have_posts()) : the_post(); ?>
        <li>
            <?php if (is_page() || is_single()) { ?>
            <h2 class="post-title"><?php the_title(); ?></h2>
            <?php } else { ?>
            <h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <?php } ?>
            <?php if((!is_page() or $options['metaenabled']) or $options['txtsizechange']) { ?>
            <div class="post-meta">
                <?php if(!is_page() or $options['metaenabled']) { ?>
                <div class="meta-left">
                </div>
                <?php } ?>
                <div class="meta-right">
                    <?php if(!is_page() or $options['metaenabled']) { ?>
                    <?php } ?>
                    <?php if((is_single() or is_page()) and $options['txtsizechange']) { ?>
                    <p class="changesize" onclick="changeFontSize()" title="Increase/Decrease font size"><span id="fontsmall">A</span> <span id="fontbig">A</span></p>
                    <input type="hidden" value="inc" name="fontoperation" id="fontoperation" />
                    <?php } ?>
                </div>
                   <?php endwhile; ?>
        <?php } ?>

    And here is the error code I keep getting when I try to view it.

    “Parse error: syntax error, unexpected T_ENDWHILE in /home1/victosb9/public_html/wp-content/themes/vbbc-2.0/index.php on line 45”

Viewing 15 replies - 1 through 15 (of 20 total)