Aangemaakte reacties

7 reacties aan het bekijken - 16 tot 22 (van in totaal 22)
  • Thread starter Kevin

    (@kmulders)

    Alleen dit roept een bepaalde code aan die in je functions.php bestand staat. Open je functions.php bestand maar eens en zoek dan op custom_comment dan zal je daar de rest van de HTML vinden zodat je meer overzicht krijgt hoe de lay-out in elkaar zit.

    Ik moest even zoeken, maar heb onderstaande kunnen vinden in de pagina comments_functions.php. Volgens mij is dit wat je bedoelt? Ik begrijp de code voor 80%, maar kan aan de hand hiervan toch nog niets wijzigen zoals ik het voor ogen heb?

    Overigens gebruik ik de template ‘StoreBox’ – een geïntegreerde webshop. Geweldig thema, maar met wat bijzonderheden qua aanpassing ten opzichte van een regulier template 😉

    // Custom comment loop
    function custom_comment($comment, $args, $depth) {
           $GLOBALS['comment'] = $comment; ?>
    
    <li class="comment wrap threaded" id="comment-<?php comment_ID() ?>">
    
    			<div class="text-right <?php if (1 == $comment->user_id) $oddcomment = "authcomment"; echo $oddcomment; ?>">
                 	<p class="authorcomment"><strong><?php comment_author_link() ?> vroeg<span> op <?php comment_date('d M Y'); ?>: </strong></span> </p>
     				<?php comment_text() ?>
     				<?php if ($comment->comment_approved == '0') : ?>
     				<p><em><?php echo get_option('ptthemes_comment_moderation_name'); ?></em></p>
     				<?php endif; ?>
     			</div>
    
    		<span class="comm-reply">
     		<?php edit_comment_link('Aanpassen'.'', '&nbsp;&nbsp;', ''); ?>
     		<?php delete_comment_link(get_comment_ID()); ?>
     		</span>
    
    		<div class="clearfix"></div>
    
    <?php } ?>
    Thread starter Kevin

    (@kmulders)

    Nee helaas haha..

    Dus blijven proberen maar 🙂

    Dit is de code die ik heb (comments.php)… Volgens mij moet ik hier in werken toch?

    <?php
    // Do not delete these lines
    	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    		die (__('Please do not load this page directly. Thanks!'));
    
    	if ( post_password_required() ) { ?>
    
    <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.');?></p>
    <?php
    		return;
    	}
    ?>
    <!-- You can start editing here. -->
    <div id="comments_wrap" >
      <?php if ( have_comments() ) : ?>
      <h3>
        <?php _e('One Comment');?>
          </h3>
      <ol class="commentlist">
        <?php wp_list_comments('avatar_size=48&callback=custom_comment'); ?>
      </ol>
      <div class="navigation">
        <div class="fl">
          <?php previous_comments_link() ?>
        </div>
        <div class="fr">
          <?php next_comments_link() ?>
        </div>
        <div class="fix"></div>
      </div>
      <br />
      <?php if ( $comments_by_type['pings'] ) : ?>
      <h3 id="pings"><?php _e('Trackbacks For This Post');?></h3>
      <ol class="commentlist">
        <?php wp_list_comments('type=pings'); ?>
      </ol>
      <?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. -->
      <?php else : // comments are closed ?>
      <!-- If comments are closed. -->
      <p class="nocomments">Comments are closed.</p>
      <?php endif; ?>
      <?php endif; ?>
    </div>
    <!-- end #comments_wrap -->
    <?php if ('open' == $post->comment_status) : ?>
    <div id="respond">
      <h3><?php _e('Leave a Reply');?> </h3>
      <div class="cancel-comment-reply">
        	<p> <?php cancel_comment_reply_link(); ?> </p>
          </div>
      <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
      <?php printf(__('<p>You must be <a href="%s/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>',site_url()));?>
      <?php else : ?>
      <form action="<?php echo site_url('/wp-comments-post.php'); ?>" method="post" id="commentform">
        <?php if ( $user_ID ) : ?>
        <p>logged in &rarr; <a href="<?php echo site_url('/wp-admin/profile.php'); ?>"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="Log out of this account"><?php _e('Logout');?> &raquo;</a></p>
        <?php else : ?>
        <p class="commpadd">
          <label for="author"><?php _e('Name');?>
          <?php if ($req) _e('*'); ?>
          </label>
         <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
         </p>
        <p class="commpadd">
           <label for="email"><?php _e('Mail');?>
          <?php if ($req) _e('*'); ?>
          </label>
          <input type="text" name="email" id="email" value="<?php echo $comment_auth_email; ?>" size="22" tabindex="2" />
    
        </p>
        <p class="commpadd">
        	<label for="url" ><?php _e('Website');?></label>
          <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
        </p>
        <?php endif; ?>
        <p class="commpadd">
          <label for="comment"><?php _e('Comment');?></label>
          <textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea>
        </p>
    
          <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Add Comment');?>" />
          <?php comment_id_fields(); ?>
    
        <?php do_action('comment_form', $post->ID); ?>
      </form>
      <?php endif; // If logged in ?>
      <div class="fix"></div>
    </div>
    <!-- end #respond -->
    <?php endif; // if you delete this the sky will fall on your head ?>

    Thread starter Kevin

    (@kmulders)

    Hmmm… Vanalles geprobeerd, maar het lukt me niet 🙁

    Mijn thema gebruikt div’s. Is er niet een standaard code die ik in een PHP-pagina kan plakken en klaar-is-Kees? :s

    Thread starter Kevin

    (@kmulders)

    Avatar is inderdaad gelukt, ik krijg nog wel de ‘afbeelding’ te zien dat standaard naast de avatar staat (lijn met pijltje naar links), maar die krijg ik inderdaad wel weg met CSS.

    Moet ik voor het naast elkaar plaatsen van het invoerveld en de geplaatste reactie’s div’s gebruiken? Daar ben ik niet zo in thuis…

    Thread starter Kevin

    (@kmulders)

    Te snel gevraagd ipv eerst zelf even te zoeken… *bloos*

    Maar wel precies wat ik zocht, dankjewel! 🙂

    Forum: Code oplossingen gezocht
    In antwoord op: Zoekformulier
    Thread starter Kevin

    (@kmulders)

    Perfect, het is gelukt!

    Heb de werkwijze van mpol gebruikt, maar toch beiden bedankt! 🙂

    Thread starter Kevin

    (@kmulders)

    Dat zou inderdaad op zich wel kunnen, ware het niet dat ik subcategorieën heb in de shop en dus graag het (standaard) dropdownmenu in het menu wil handhaven.

    Wanneer ik de URL zou kopiëren/plakken in de PHP-code heb ik alleen de hoofdcategorie en niet de submenu’s als dropdown…

7 reacties aan het bekijken - 16 tot 22 (van in totaal 22)