This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Ajit Sahane

  • ****
  • 178 posts
  • https://bestclassifiedsusa.com
How to Add Nofollow in URL Custom Field type
« on: November 09, 2022, 01:16:11 PM »
I am added URL type custom field. Now website field link want nofollow norefrere tag into a href link.

But this code edit not found..

Anyone idea ...? How can insert these nofollow into href link..?

*

mwindey

  • *****
  • 485 posts
Re: How to Add Nofollow in URL Custom Field type
« Reply #1 on: November 09, 2022, 01:56:38 PM »
< a href="https://link.com" rel="nofollow" >

*

Ajit Sahane

  • ****
  • 178 posts
  • https://bestclassifiedsusa.com
Re: How to Add Nofollow in URL Custom Field type
« Reply #2 on: November 09, 2022, 04:54:55 PM »
But where this code located ...?

<a href="#"></a>  below this code print this value.  need deeper code for edit


 <!-- CUSTOM FIELDS -->
        <div class="props<?php if($has_cf) { ?> style<?php } ?>">
          <?php if($has_cf) { ?>
           <?php /* <h2><?php _e('Website', 'epsilon'); ?></h2> */ ?>
            <div class="custom-fields">
              <?php while(osc_has_item_meta()) { ?>
                <?php
                  $meta = osc_item_meta();
                  $meta_type = @$meta['e_type'];
                  $meta_value = @$meta['s_value'];
                 
                  if($meta_type != 'CHECKBOX') {
                    $meta_value = osc_item_meta_value();
                  }
                ?>
             
                <?php if(osc_item_meta_value() != '') { ?>
                  <div class="field type-<?php echo osc_esc_html($meta_type); ?> name-<?php echo osc_esc_html(strtoupper(str_replace(' ', '-', osc_item_meta_name()))); ?> value-<?php echo osc_esc_html($meta_value); ?>">
                    <span class="name"><?php echo osc_item_meta_name(); ?></span>
                    <span class="value"><?php echo osc_item_meta_value(); ?></span>
                  </div>
                <?php } ?>
              <?php } ?>
            </div>
          <?php } ?>     

          <div id="item-hook"><?php osc_run_hook('item_detail', osc_item()); ?></div>
        </div>
       

Marked as best answer by ajit.sahane on November 21, 2022, 08:46:40 PM
*

MB Themes

Re: How to Add Nofollow in URL Custom Field type
« Reply #3 on: November 14, 2022, 05:05:23 PM »
This is constructed in core, I would recommend to replace:
Code: [Select]
<?php echo osc_item_meta_value(); ?>
with:
Code: [Select]
<?php echo str_replace('<a''<a rel="nofollow"'osc_item_meta_value()); ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots