Forum Replies Created

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

    (@vandeberg25)

    I have to change it back…I can’t leave the default theme activiate. I’ll have to look for support elsewhere..

    Thread Starter vandeberg25

    (@vandeberg25)

    OK -activated

    Thread Starter vandeberg25

    (@vandeberg25)

    The theme changes and the home page displays the custom posts just like it currently does… What are you specifically wanted to see change?

    I did a preview, but did not activate the default theme yet. What are you looking for?

    Thread Starter vandeberg25

    (@vandeberg25)

    Yes – I have “static front page” selected. I also checked the front page setting within the Theme -customize tab. I also have “static front page” selected there as well.

    That did it! Great – Thank you so much for your help!!!

    Sorry – that did not work. Other Suggestions?

    We are getting closer! It is displaying the phone number with the link and in the correct place; but it is still displaying the phone number 2 times. Once without the link and once with.

    Here is a sample.

    I have used the code exactly as you posted above, only adding the closing tag at the end of the the second a href…

    Any other suggestions? I do not know PHP well enough to figure this one out. Thank you for your time and assistance!!

    I changed the code to match your suggestion and it is still displaying the phone numbers twice; once before the field header – with the a href link active and a second time after the field header.

    See an example here

    Here is a big chunk of the code to review

    <?php while ( $this->have_fields() ) : $this->the_field();
    
              // skip any field found in the exclude array
              if ( in_array( $this->field->name, $exclude ) ) continue;
    
              // CSS class for empty fields
    					$empty_class = $this->get_empty_class( $this->field );
    
          ?>
    	  <?php if($this->field->name === 'phone1') : ?>
                                     <a href="tel:<?php $this->field->print_value() ?>">
    <?php $this->field->print_value() ?>
    </a>
                            <?php else : ?>
    
                            <?php endif; ?>
    
                            <?php if($this->field->name === 'phone2') : ?>
                                    <a href="tel:<?php $this->field->print_value() ?>">
    <?php $this->field->print_value() ?>
    </a>
                            <?php else : ?>
    
                            <?php endif; ?>
    
          <dl class="<?php echo Participants_Db::$css_prefix.$this->field->name.' '.$this->field->form_element.' '.$empty_class?>">
    
          <dt class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_label() ?></dt>
    
                            <dd class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_value() ?></dd>
    
        </dl>
    
        	<?php endwhile; // end of the fields loop ?>

    Any other suggestions? I may decide to bale on trying to add this feature this wasy as the WPtouch plugin will render the phone numbers to do this.

    I would like to do the same thing – make the telephone number clickable on mobile devices. I used the code above – with a couple changes because it was displaying each field data twice. (I also have 2 phone fields). Now it is displaying the phone numbers clickable like I want, but above the field header. Here is the link to view my data.

    It is also listing the phone number data again without the link in the correct place. Can you help me get this PHP code correct?

    <?php while ( $this->have_fields() ) : $this->the_field();
    
              // skip any field found in the exclude array
              if ( in_array( $this->field->name, $exclude ) ) continue;
    
              // CSS class for empty fields
    					$empty_class = $this->get_empty_class( $this->field );
    
          ?><?php if($this->field->name === 'phone1') : ?>
                                     <a href="tel:<?php echo $this->field->print_value() ?>">
                                	<?php echo $this->field->print_value() ?>
                                </a>
                            <?php else : ?>
    
                            <?php endif; ?>
                            <?php if($this->field->name === 'phone2') : ?>
                                     <a href="tel:<?php echo $this->field->print_value() ?>">
                                	<?php echo $this->field->print_value() ?>
                                </a>
                            <?php else : ?>
    
                            <?php endif; ?>
    
          <dl class="<?php echo Participants_Db::$css_prefix.$this->field->name.' '.$this->field->form_element.' '.$empty_class?>">
    
          <dt class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_label() ?></dt>
    
                            <dd class="<?php echo $this->field->name.' '.$empty_class?>"><?php $this->field->print_value() ?></dd>
    
        </dl>
    
        	<?php endwhile; // end of the fields loop ?>
    
      </div>
    
      <?php endwhile; // end of the groups loop ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thread Starter vandeberg25

    (@vandeberg25)

    OK – I can try that. How do you limit the fields displayed on the smaller screen sizes? I created two different short codes, the first one with 5 fields and the second with only 1 field to fit/view nicely on a small screen. I felt this was a better option with the database list in a table format instead of trying to squeeze a table with 5 columns into a 240-480 phone screen.

    I have a basic understanding of how CSS works – I didn’t realize I could use CSS to limit the data returned (using short codes).

    Please explain and I’ll check out the plugin you suggested.

    Thread Starter vandeberg25

    (@vandeberg25)

    There are CSS styles at each of these sizes:

    @media screen and (max-width: 980px)
    @media screen and (max-width: 650px)
    @media screen and (max-width: 480px)
    @media screen and (max-width: 320px)
    @media screen and (max-width: 240px)

    The show/hide feature I am trying to implement – I want to take effect at the 480px and smaller screen widths. I have no problems at the larger screen widths. Its the revealing only at the smaller screen sizes that I’m having trouble with.

    Thread Starter vandeberg25

    (@vandeberg25)

    In theory the show/hide concept should work, however I’m running into a roadblock and can’t figure it out. Could you look over the code I’m using and see any issues?

    Here is the shortcode for the 2 lists I have placed on the page. Members1 displays until the window is resized to 480 pixels or less. (the ‘hide-480’ class is already built into the WordPress Responsive Theme CSS code). This part works. The second list ‘membersmobile’ is hidden to start and then I want it to display at 480pixels. It just stays hidden…

    ‘[pdb_list class=”members1 hide-480″ search=”true” list_limit=”25″ filter=”yr_last_members=2013″ orderby=”last_name” order=”asc” display_count=”true”]

    [pdb_list class=”membersmobile” search=”false” list_limit=”25″ fields=”farm_name” filter=”yr_last_members=2013″ orderby=”farm_name” order=”asc” display_count=true]’

    Here is the CSS in my child – stylesheet:

    ‘.wrap.pdb-list.membersmobile {
    display: none;
    }

    ‘@media screen and (max-width: 480px) {

    .wrap.pdb-list.membersmobile {
    display: block;
    }
    }’

    Here is my page: https://michiganangus.com/membership/

    I would really like to use this plug-in but if I can’t resolve the responsive component, I will have to find a different solution.

    I would really appreciate your feedback or suggestions.
    Thank you
    Rebecca

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