How can I make some fields on Speaker details disappear?

  1. Home
  2. Docs
  3. Fudge
  4. Frequently Asked Question...
  5. How can I make some fields on Speaker details disappear?

How can I make some fields on Speaker details disappear?

Please do remember to backup the file prior to any changes.

1) Open wp-content/themes/fudge/js/script.js

2) Please search and find the following code (around line number 90):

$.ajax({

type: “POST”,

dataType: “json”,

url: ajaxurl,

data: {

‘action’: ‘get_speaker’,

‘data-id’: $(this).attr(‘data-id’)

},

success: function(data) {

var sessions = ”;

var post_edit_link = ”;

3) Below that code, please add

var company_details = ”;

var twitter_details = ”;

var shortbio_details = ”;

var website_details = ”;

if(data.company){

company_details = ‘<p><span>’ + fudge_script_vars.company + ‘</span>’ + data.company + ‘</p>’

}

if(data.twitter_username){

twitter_details = ‘<p><span>’ + fudge_script_vars.twitter + ‘</span>’ + data.twitter_username + ‘</p>’

}

if(data.short_bio){

shortbio_details = ‘<p><span>’ + fudge_script_vars.shortbio + ‘</span>’ + data.short_bio + ‘</p>’

}

if(data.website_url){

website_details = ‘<p><span>’ + fudge_script_vars.website + ‘</span><a href=”http://’ + data.website_url + ‘”>’ + data.website_url + ‘</a></p>’

}

4) Search for the following code (around line number 118)

<div class=”details”>

<p><span>’ + fudge_script_vars.company + ‘</span>’ + data.company + ‘<p>

<p><span>’ + fudge_script_vars.shortbio + ‘</span>’ + data.short_bio + ‘<p>

<p><span>’ + fudge_script_vars.website + ‘</span><a href=”http://’ + data.website_url + ‘”>’ + data.website_url + ‘</a><p>

<p><span>’ + fudge_script_vars.twitter + ‘</span>’ + data.twitter_username + ‘<p>

</div>

5) Replace the above code with :

<div class=”details”>

‘+ company_details +’

‘+ shortbio_details +’

‘+ website_details +’

‘ + twitter_details + ‘

</div>

6) Save the file.

Please add the changes carefully. If any error occurs, it will not display speakers.

 

Was this article helpful to you? Yes 1 No