Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Actually no. Here is the functions.php in its entirety

    <?php
    // Set path to WooFramework and theme specific functions
    $functions_path = TEMPLATEPATH . '/functions/';
    $includes_path = TEMPLATEPATH . '/includes/';
    
    require_once ($functions_path . 'admin-init.php');			// Framework Init
    
    // Theme specific functionality
    require_once ($includes_path . 'theme-options.php'); 		// Options panel settings and custom settings
    require_once ($includes_path . 'theme-functions.php'); 		// Custom theme functions
    require_once ($includes_path . 'theme-plugins.php');		// Theme specific plugins integrated in a theme
    require_once ($includes_path . 'theme-actions.php');		// Theme actions & user defined hooks
    require_once ($includes_path . 'theme-comments.php'); 		// Custom comments/pingback loop
    require_once ($includes_path . 'theme-js.php');				// Load javascript in wp_head
    require_once ($includes_path . 'sidebar-init.php');			// Initialize widgetized areas
    require_once ($includes_path . 'theme-widgets.php');		// Theme widgets
    ?>

    and the theme-widgets.php here

    <?php
    include( TEMPLATEPATH . '/includes/widgets/widget-woo-social.php' );
    ?>

    and I am trying to make a change in function widget in widget-woo-social.php file

    <?php
    /*---------------------------------------------------------------------------------*/
    /* Address Widget */
    /*---------------------------------------------------------------------------------*/
    class WP_Widget_Social extends WP_Widget {
    
    	function WP_Widget_Social() {
    		$widget_ops = array('classname' => 'widget_social', 'description' => __('Add social links in your sidebar'));
    		$this->WP_Widget('woo_social', __('Woo - Social'), $widget_ops);
    	}
    
    	function widget( $args, $instance ) {
    		extract($args);
    		$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
    
    		$facebook = apply_filters( 'widget_facebook', $instance['facebook'], $instance );
    		$twitter = apply_filters( 'widget_twitter', $instance['twitter'], $instance );
    		$flickr = apply_filters( 'widget_flickr', $instance['flickr'], $instance );
    		$youtube = apply_filters( 'widget_facebook', $instance['youtube'], $instance );
    
    		echo $before_widget;
    		if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
    
    			<div class="socialwidget">
    			<?php if ( !empty( $facebook ) ) { echo '<a href="'.$facebook.'" class="ico-facebook">'.__('Facebook','woothemes') . '</a>'; } ?>
    			<?php if ( !empty( $twitter ) ) { echo '<a href="'.$twitter.'" class="ico-twitter">'.__('Twitter','woothemes') . '</a>'; } ?>
    			<?php if ( !empty( $flickr ) ) { echo '<a href="'.$flickr.'" class="ico-flickr">'.__('LinkedIn','woothemes') . '</a>'; } ?>
    			<?php if ( !empty( $youtube ) ) { echo '<a href="'.$youtube.'" class="ico-youtube">'.__('Youtube','woothemes') . '</a>'; } ?>
    			<div class="clear"></div>
    			</div>
    
    		<?php
    		echo $after_widget;
    	}
    ......
    ......
    ......
    ?>

    Thanks for the reply.

    My functions.php has the following

    require_once (/includes/theme-widgets.php'); // Theme widgets

    and the /includes/theme-widgets.php file references

    include( TEMPLATEPATH . '/includes/widgets/widget-woo-social.php' );

    And I am trying to make a change in the widget-woo-social.php file’s content. (A PHP class to be exact)

    Thanks in advance.

    Hi Jeff,

    I am looking for an andwer to the same question. Have you figured this out?

    Thanks,
    Karthik

    Thread Starter kinthehouse

    (@kinthehouse)

    Garry.. I sure had the 2 best pair of eyes looking at this issue! ?? Most fellow bloggers doesn’t know that we blog because we love to tinker with WordPress under the hood! so shhhhh LOL

    Thread Starter kinthehouse

    (@kinthehouse)

    Hey guys.. the problem is solved!

    It’s crazy how I solved it. I just created a category.php file and put the same loop as in index.php and it works now!!

    I was testing with a stripped down version of sidebar.php with no multiple loops but just the dynamic sidebar, and the category archive pages wasn’t loading. So, I created a category.php file and now it works!

    Thanks for your help guys!

    Thread Starter kinthehouse

    (@kinthehouse)

    moshu, exactly what I am trying to do! I just need the sidebar to display a certain set of posts in the sidebar on both occasions – a single post of a certain category or if I am displaying category archive page for that category. So, I am using:
    is_category('41') || in_category('41')

    And this is the part Cybercoder was asking if it’s ok to use it like this. The Codex indicates I need to do some special treatment to use in_category outside the loop

    https://codex.www.ads-software.com/Template_Tags/in_category#Use_OUTSIDE_The_Loop

    Thread Starter kinthehouse

    (@kinthehouse)

    Your pointer about the is_category and in_category has sent me on the right track now, I think. in_category is supposedly meant for only inside the main loop. I will see if I modification to that code makes any difference. Thanks!

    Hi, I am trying to do the same and facing the same issue. Did you resolve this by an chance? It will be of great help if you could share how you fixed it.

    Thanks!

    Thread Starter kinthehouse

    (@kinthehouse)

    Oh, I appreciate the help!

    I didn’t publish the full sidebar.php code in pastebin as it’s kind of long and unwieldy. But, it pretty much checks for various categories and does the same over again and the final else prints the dynamic sidebar code.

    The theme I am using doesn’t have a category.php to investigate. So, by template hierarchy I guess it would use index.php for category pages.

    This is again the reason why I think my sidebar loops (even though I have tried to use custom loops instead of using wp_query) could be resetting the main loop!

    And all the theme files fire the sidebar.php before the content.

    Thread Starter kinthehouse

    (@kinthehouse)

    Hey buddy, I’ll definitely try it but it might be worth noting that I am not having any problems with this particular part of the code itself. The sidebar displays the posts from the particular category I am viewing but the content area just displays posts from the blog instead of that category!

    Thread Starter kinthehouse

    (@kinthehouse)

    moshu, sorry that is a different site I am having this problem with and not on my personal blog.

    Thanks af3. It worked like a charm for me too in version 2.6! ??

    Thread Starter kinthehouse

    (@kinthehouse)

    Hi,

    I traced the error to this:

    [Thu Oct 18 22:14:48 2007] [error] PHP Fatal error: main() [function.require]: Failed opening required ‘/home/karthiik/public_html/wp-content/wp-settings.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/karthiik/public_html/wp-content/wp-config.php on line 21
    [Thu Oct 18 22:14:48 2007] [error] PHP Warning: main(/home/karthiik/public_html/wp-content/wp-settings.php) [function.main]: failed to open stream: No such file or directory in /home/karthiik/public_html/wp-content/wp-config.php on line 21

    During my WordPress 2.3 upgrade, I think I got an error as if the upgrade process was looking wp-config.php file inside wp-content instead of the WordPress root.

    I know I probably shouldn’t have but I just copied the wp-config file into wp-content directory and everything was working fine until a couple of days back.

    I did try wp-settings.php file as well but it didn’t help.

    Any ideas?

    I’ll appreciate any ideas on how to approach this.

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