Forum Replies Created

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

    (@paulocot)

    Correct me if I’m wrong Angelo but that changes the backend? I’m wanting to change the format of the fixture table that’s displayed on the frontend.

    Thread Starter PauloCot

    (@paulocot)

    Can you elaborate a little please?

    FYI I have the full theme.

    Thread Starter PauloCot

    (@paulocot)

    My functions.php looks like this:

    <?php
    /**
     * WPZOOM Theme Functions
     *
     * Don't edit this file until you know what you're doing. If you mind to add
     * functions and other hacks please use functions/user/ folder instead and
     * functions/user/functions.php file, those files are intend for that and
     * will never be overwritten in case of a framework update.
     */
    
    /**
     * Paths to WPZOOM Theme Functions
     */
    define("FUNC_INC", get_template_directory() . "/functions");
    
    define("WPZOOM_INC", FUNC_INC . "/wpzoom");
    define("THEME_INC", FUNC_INC . "/theme");
    define("USER_INC", FUNC_INC . "/user");
    
    /** WPZOOM Framework Core */
    require_once WPZOOM_INC . "/init.php";
    
    /** WPZOOM Theme */
    require_once THEME_INC . "/functions.php";
    require_once THEME_INC . "/sidebar.php";
    require_once THEME_INC . "/post-options.php";
    
    /* Theme widgets */
    require_once THEME_INC . "/widgets/featuredposts.php";
    require_once THEME_INC . "/widgets/flickrwidget.php";
    require_once THEME_INC . "/widgets/social.php";
    
    /** User functions */
    require_once USER_INC . "/functions.php";

    Should I do the changes in the functions file it suggests.

    I’m not quite sure what you mean by filter and how the code would look. Would it be a case of adding:

    add_filter( 'get_comments_link', 'filter_function_name', 10 );
    
    function filter_function_name( $link) {
        // Manipulate comment link
        return $link;
    }

    To the functions.php file and adding a div to it or is there more coding required? Also what does the 10 in the code stand for?

    Be patient with me! ??

    Thread Starter PauloCot

    (@paulocot)

    Thanks Rod, I’ll keep that in mind and make sure to backup before doing any updates.

    Which functions.php because there is one within the theme and others within the WordPress directory. Also, I want to add another link not edit the old one.

    I guess my main problem is I don’t know how or where to edit the code so it applies to all comments.

    Thread Starter PauloCot

    (@paulocot)

    Thank you, I think the issue was the page field wasn’t ticked when the code was manually inserted. Just so you know I have both page and post ticked, with neither post at top or bottom ticked but the page.php doesn’t need to the manual code whereas the post page (single.php) does!

    After further research I’ve been advised I need to alter the wp_list_comments function… but have no idea how to do this?

    Can you help with that Rahul? And even better how to insert the above code into that function?

    Thread Starter PauloCot

    (@paulocot)

    Don’t worry guys, have managed to fix it!

    page.php wasn’t calling comments_template(); where as single.php (posts) was. Just copied the code over and it is fine!

    Thread Starter PauloCot

    (@paulocot)

    The theme is photoria. That’s the issue, I had the comments working perfectly. I had edited the code in page.php / comments.php so every page would display the number of comments (comment count) i.e. adding the comment count function to page.php . I did this because the way my site works every page with the exception of one would display comments.

    I then stupidly reset the whole theme and now I have this problem!

    Thanks for the reply Rahul, I’m still having problems though.

    Here is my code from comments.php

    <?php if (have_comments()) { ?>
      <div id="commentspost"><a name="commentspost"></a>
    	<ol class="normalComments"><?php wp_list_comments('type=all&avatar_size=60'); ?></ol>
    	</div><!-- end #commentspost -->
    
    <?php if ('closed' == $post->comment_status) : ?>
    <?php endif; ?>
    
     <?php }
     else { // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) { ?>
    		<!-- If comments are open, but there are no comments. -->
    <div id="commentspost">
    	<h2 class="title">0 <?php _e('Comments', 'wpzoom'); ?></h2>
      <p><?php _e('You can be the first one to leave a comment', 'wpzoom'); ?>.</p>
    </div>
    	 <?php } else { // comments are closed ?>
    		<!-- If comments are closed. -->
    	<?php } ?>
    <?php } ?>

    Here is my code from page.php

    <?php
    			wp_reset_query();
    
    			if ( have_posts() ) :
    
    				while ( have_posts() ) :
    
    					the_post();
    
    					?><h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
                                            <h2 class="title"><?php comment_type_count();?> <?php _e('Comments', 'wpzoom'); ?></h2>
    
    					<p class="postmetadata"><?php edit_post_link( __('EDIT', 'wpzoom'), '', ''); ?></p> 
    
    					<div class="postcontent">
    
    <?php comments_template(); ?> <?php
    
    				endwhile;

    I realise comments.php would make more sense to enter the like/dislike counter code but the code which refers to the comments in page.php looks more familiar from previous comments on here.

    If you could tell me which and where exactly the code should go that would be awesome!

    Thanks in advance!

    Hi Rahul,

    Have just downloaded your WP like dislike counter plugin. I am trying to get a like/dislike (with counter) under each wordpress comment but am unsure where to put

    <?php if(function_exists('like_counter_c')) { like_counter_c("Like"); } ?>
    <?php if(function_exists('dislike_counter_c')) {dislike_counter_c("Dislike"); } ?>

    Firstly do you put it in comments.php or loop.php and secondly could you advise where it should go within that?

    Thanks in advance,
    Paul

    Thread Starter PauloCot

    (@paulocot)

    Each comment does have its own URL but it is in the form of /texas/#comment-118 – not sure if that would work?

    The type of website it is and how I aim to generate traffic makes it pretty important that each comment has its own facebook comment box. Basically I need users to be able to direct facebook comments to each specific “anonymous” WordPress comment.

    To reduce the impact on performance I believe there is an option within the comments settings to limit a page to a certain number of comments which I will explore.

    Is changing the code from one facebook comment box per page to one per comment as simple as changing a line in the facebook plugin code or comments.php? Or does it require more?

    My php skills are limited to basic understanding of the code and copying/moving the code about.

    I appreciate you taking the time to respond to this!

    Thread Starter PauloCot

    (@paulocot)

    Thanks for the reply.

    How come it’s bad for performance and user experience?

    I’m not proficient enough to write out entire code from scratch ??

    Is there nowhere in my existing comments.php code I can insert the facebook comment box shortcode to put a facebook comment box at the bottom of each comment?

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