Ondersteuning » Algemeen WordPress » read more button, krijg 'm niet aan de praat

  • De titel zegt het al, de read more functie.
    Ik heb echt geen idee hoe ik die werkend krijg in de testimonials of op andere pagina’s.
    Iemand tips??

    Dank alvast!

10 reacties aan het bekijken - 1 tot 10 (van in totaal 10)
  • Dit is normaal standaard in WP…

    Op de More tag drukken daar waar je een break-point wilt maken en klaar.
    Simpeler kan het toch niet?

    Of wat lukt er niet?

    Thread starter ireneC

    (@irenec)

    Dat dacht ik ook….
    Ik voer de tekst in, druk op die button, zie vervolgens ook dat ie de tekst afbreekt maar als ik dan publiceer dan staat de hele tekst er. En nergens de ‘lees meer’.
    Ik zal wel iets fout doen hoor, heb alleen geen idee wat ik fout doe???

    Welk thema gebruik je?

    Dan kan ik kijken of deze functie miss. gewist is uit het thema.

    Thread starter ireneC

    (@irenec)

    Ik gebruik het Beauty and Clean thema.
    Volgens mij is het niet gewist hoor. De vraag heb ik ook al een keer gepost in het forum wat er achter zit maar kan niet zoveel wijs uit het antwoord.
    Moest ergens iets doen met een code in de stylesheet. Heeft alleen niet geholpen of ik heb het fout gedaan.

    Thread starter ireneC

    (@irenec)

    Ik ben hem even aan het testen maar waar moeten die testimonials opduiken?

    Ik heb er ééntje aangemaakt maar zie niets gebeuren op de homepage..
    ???

    Waarschijnlijk hebben ze geen support aangemaakt voor de Excerpts en Read More functie in de Custom Post Type – testimonials.

    Hier kun je veel informatie vinden over hoe je dit simple kunt aanpassen, de functie is wel aanwezig bij de normale blog posts dus waarschijnlijk hebben ze hem niet geactiveerd in de Testimonials optie.

    http://codex.wordpress.org/Customizing_the_Read_More

    Ik heb helaas geen tijd om zo diep in een thema te duiken en me te gaan verdiepen in dit thema. Het thema heeft zoveel functies dat ik eerst moet uitzoeken hoe ze het hebben opgebouwd terwijl ze ook een support forum hebben waar vast en zeker deze vraag al eens gesteld is.
    http://www.yourinspirationweb.com/tf/support/forum/

    Thread starter ireneC

    (@irenec)

    Heb die vraag zelf al gesteld(heb een link boven je laatste antwoord gepost)Maar je moet zeker ingelogd zijn om die te kunnen lezen?

    De testimonials moeten op het cursusdeel van de site zichtbaar zijn. Op het douladeel heb ik weer andere testimonials. Wil die twee echt van elkaar gescheiden houden.

    Ja sorry daar moet je voor ingelogd zijn om dat te kunnen lezen. helaas.

    Thread starter ireneC

    (@irenec)

    Dan gaan we dat even anders doen 😉

    Try to get the file inside the archive attached and replace it in wp-content/themes/beauty-premium/includes/widgets/. The file changed is testimonials.php.
    <?php

    class testimonials extends WP_Widget
    {
    function testimonials()
    {
    $widget_ops = array(
    ‘classname’ => ’testimonial-widget’,
    ‘description’ => __(‘Add a slider testimonial on your widget which link a category to show the contents.’, TEXTDOMAIN)
    );

    $control_ops = array( ‘id_base’ => ’testimonial-widget’ );

    $this->WP_Widget( ’testimonial-widget’, ‘Testimonial Widget’, $widget_ops, $control_ops );
    }

    function widget( $args, $instance )
    {
    extract( $args );

    /* User-selected settings. */
    if( !isset( $instance[’title’] ) )
    $instance[’title’] = ”;

    $title = apply_filters(‘widget_title’, $instance[’title’] );

    $test_fx = isset( $instance[’test_fx’]) ? $instance[’test_fx’] : ‘fade’;
    $test_easing_fx = isset( $instance[’test_easing_fx’]) ? $instance[’test_easing_fx’] : false;
    $test_timeout_fx = isset( $instance[’test_timeout_fx’]) ? $instance[’test_timeout_fx’] : 5000;
    $test_speed_fx = isset( $instance[’test_speed_fx’]) ? $instance[’test_speed_fx’] : 500;
    $test_n_items = isset( $instance[’test_n_items’]) ? $instance[’test_n_items’] : 5;
    $size = 32;

    $test_posts = new WP_Query(“post_type=bl_testimonials&posts_per_page=$test_n_items”);

    if( $test_posts->have_posts() )
    {
    echo $before_widget;

    if ( $title ) echo $before_title . $title . $after_title;

    echo ‘<div class=”testimonial-text”>’;
    echo ‘

      ‘;
      while( $test_posts->have_posts() )
      {
      $test_posts->the_post();

    global $more, $post;
    $more = 0;

    echo ‘

    • ‘;
      echo ‘

      ‘;
      the_content();
      the_title( ‘[‘, ‘ ]‘ );
      echo ‘

      ‘;
      echo ‘

    • ‘;
      }
      echo ‘
      ‘;

      echo ‘<div class=”pagination p-testimonial”></div>’;
      echo ‘</div>’;

      $easing_attr = ”;
      if( $test_easing_fx ) $easing_attr = “easing: ‘$test_easing_fx’,”;

      $script = “<script type=\”text/javascript\”>
      jQuery(document).ready(function($){
      $(‘.testimonial-widget ul’).cycle({
      fx:’$test_fx’,
      $easing_attr
      timeout:$test_timeout_fx,
      speed:$test_speed_fx,
      pager:’.p-testimonial’
      });
      });
      </script>”;

      echo $script;

      echo $after_widget;

      }

      wp_reset_query();
      }

      function update( $new_instance, $old_instance )
      {
      $instance = $old_instance;

      $instance[’title’] = strip_tags( $new_instance[’title’] );

      $instance[’test_n_items’] = $new_instance[’test_n_items’];

      $instance[’test_fx’] = $new_instance[’test_fx’];

      $instance[’test_easing_x’] = $new_instance[’test_easing_fx’];

      $instance[’test_timeout_fx’] = $new_instance[’test_timeout_fx’];

      $instance[’test_speed_fx’] = $new_instance[’test_speed_fx’];

      return $instance;
      }

      function form( $instance )
      {
      global $icons_name, $fxs, $easings;

      /* Impostazioni di default del widget */
      $defaults = array(
      ’title’ => ‘Testimonials’,
      ’test_n_items’ => 5,
      ’test_fx’ => ‘scrollLeft’,
      ’test_easing_fx’ => FALSE,
      ’test_timeout_fx’ => 8000,
      ’test_speed_fx’ => 300
      );

      $categories = get_categories(‘hide_empty=1&orderby=name’);
      $wp_cats = array();

      foreach ($categories as $category_list )
      {
      $wp_cats[$category_list->category_nicename] = $category_list->cat_name;
      }

      $instance = wp_parse_args( (array) $instance, $defaults ); ?>

      <p>
      <label for=”<?php echo $this->get_field_id( ’title’ ); ?>”>Title:
      <input type=”text” id=”<?php echo $this->get_field_id( ’title’ ); ?>” name=”<?php echo $this->get_field_name( ’title’ ); ?>” value=”<?php echo $instance[’title’]; ?>” class=”widefat” />
      </label>
      </p>

      <p>
      <label for=”<?php echo $this->get_field_id( ’test_n_items’ ); ?>”>Items:
      <select id=”<?php echo $this->get_field_id( ’test_n_items’ ); ?>” name=”<?php echo $this->get_field_name( ’test_n_items’ ); ?>”>
      <?php
      for($i=1;$i<=20;$i++)
      {
      $select = ”;
      if($instance[’test_n_items’] == $i) $select = ‘ selected=”selected”‘;
      echo “<option value=\”$i\”$select>$i</option>\n”;
      }
      ?>
      </select>
      </label>
      </p>

      <p>
      <label for=”<?php echo $this->get_field_id( ’test_fx’ ); ?>”>Effect Slider:
      <select id=”<?php echo $this->get_field_id( ’test_fx’ ); ?>” name=”<?php echo $this->get_field_name( ’test_fx’ ); ?>”>
      <?php
      foreach($fxs as $fx)
      {
      $select = ”;
      if($instance[’test_fx’] == $fx) $select = ‘ selected=”selected”‘;
      echo “<option value=\”$fx\”$select>$fx</option>\n”;
      }
      ?>
      </select>
      </label>
      </p>

      <p>
      <label for=”<?php echo $this->get_field_id( ’test_easing_fx’ ); ?>”>Easing effect:
      <select id=”<?php echo $this->get_field_id( ’test_easing_fx’ ); ?>” name=”<?php echo $this->get_field_name( ’test_easing_fx’ ); ?>”>
      <?php
      foreach($easings as $easing)
      {
      $select = ”;
      if($instance[’test_easing_fx’] == $easing) $select = ‘ selected=”selected”‘;
      echo “<option value=\”$easing\”$select>$easing</option>\n”;
      }
      ?>
      </select>
      </label>
      </p>

      <p>
      <label for=”<?php echo $this->get_field_id( ’test_timeout_fx’ ); ?>”>Timeout effect (ms):
      <input type=”text” id=”<?php echo $this->get_field_id( ’test_timeout_fx’ ); ?>” name=”<?php echo $this->get_field_name( ’test_timeout_fx’ ); ?>” value=”<?php echo $instance[’test_timeout_fx’]; ?>” size=”4″ />
      </label>
      </p>

      <p>
      <label for=”<?php echo $this->get_field_id( ’test_speed_fx’ ); ?>”>Speed Animation (ms):
      <input type=”text” id=”<?php echo $this->get_field_id( ’test_speed_fx’ ); ?>” name=”<?php echo $this->get_field_name( ’test_speed_fx’ ); ?>” value=”<?php echo $instance[’test_speed_fx’]; ?>” size=”4″ />
      </label>
      </p>
      <?php
      }
      }

      ?>

      Bovenstaande heb ik dus gedaan en toch lukt het niet.

    Thread starter ireneC

    (@irenec)

    In your website I see two sections of testimonials.. the section of the theme is: http://yourdomain/wp-admin/edit.php?pos … stimonials and for the widget of the theme, you need to change and add the tag more in the posts of this section.

    Instead, the second section is in: http://yourdomain/wp-admin/admin.php?pa … als-widget this section is not the theme.

    Waar moet ik nou wat aanpassen??

10 reacties aan het bekijken - 1 tot 10 (van in totaal 10)
  • Het onderwerp ‘read more button, krijg 'm niet aan de praat’ is gesloten voor nieuwe reacties.