• Resolved farnhamit

    (@farnhamit)


    I need some help, Does anyone know how i can add line spacing in the services description on the front page?

    I am trying to make a list of 6 items in 1 box, I have tried br,il but it does not accept HTML?
    Thank you,

Viewing 13 replies - 1 through 13 (of 13 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you link us a page with the problem?

    Thread Starter farnhamit

    (@farnhamit)

    I can do shortly its running on a private server at the moment,

    This is the code that is not working tho.

    <div class="col-md-4 col-sm-6">
    						<div class="service-box">
    				<img class="img-responsive service-box-image" alt="Sleek & Beautiful" src="/logocolourfbcool.gif">
    			</div>
    						<div class="service-area">
    						<h2><a href="#">Product Designing</a></h2>
    									<p>Quantity Surveying and Cost Consultancy</br>
    Project Management</br>
    Project Co-ordination</br>
    Cost Feasibility Studies</br>
    Preliminary Budget Advice</br>
    Cost Planning</br>
    CDM Co-ordinator</br></p>
    						</div><!-- / service-area -->
    		</div>

    That is what gets displayed when previewing the install.

    This is what i am inputting in the back-end.

    Quantity Surveying and Cost Consultancy</br>
    Project Management</br>
    Project Co-ordination</br>
    Cost Feasibility Studies</br>
    Preliminary Budget Advice</br>
    Cost Planning</br>
    CDM Co-ordinator</br>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You should be able to tweak this with CSS, without touching HTML

    Thread Starter farnhamit

    (@farnhamit)

    I have tried? I am out of ideas… When you say use CSS do you mean to change the output of that input field?

    $current_options['service_title_one'] = sanitize_text_field($_POST['service_title_one']);
    				$current_options['service_description_one'] = sanitize_text_field($_POST['service_description_one']);
    				$current_options['service_image_one']= sanitize_text_field($_POST['service_image_one']);

    This is what i assume is the issue? the Sanitize_Text_Field does this strip all HTML/Variables?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    No, I’ll give you the answer if you link the page.

    Theme Author webriti

    (@priyanshumittal)

    The field is only provided to enter text .

    But if you want to add HTML in it Than you have to remove the ‘sanitize_text_field’ function in the options panel file here is the link

    https://themes.trac.wordpress.org/browser/wallstreet/0.7/functions/theme_options/pages/home_service_settings.php

    change the following snippet
    $current_options[‘service_description_one’] = sanitize_text_field($_POST[‘service_description_one’]);

    to

    $current_options[‘service_description_one’] = $_POST[‘service_description_one’];

    Note: Do all these changes through the child theme…

    Thanks
    Priyanshu

    Thread Starter farnhamit

    (@farnhamit)

    Thank you!

    Thread Starter farnhamit

    (@farnhamit)

    Hi Priyanshu,

    I have done this, This is what i tried first, But I could only find the one file to edit wp-content/themes/wallstreet/functions/theme_options/pages/home_service_settings.php

    But it still don’t work the html tag shows on the page but only as text? Can you assist any further? What do you mean by ChildTheme? Sorry.

    Theme Author webriti

    (@priyanshumittal)

    Its a very good chance that you will lost all your changes in the theme when you update it with the next. Therefore child theme is a good place to do all these types of core edition. You can read it more regarding child theme on .org

    Anyways coming to your issue Forget to tell you also need to remove the esc_html tag during the time of o/p

    remove esc_html from https://themes.trac.wordpress.org/browser/wallstreet/0.7/index-service.php#L29

    Thanks
    Priyanshu

    Thread Starter farnhamit

    (@farnhamit)

    Thank you Priyanshu!

    ALL WORKING YOU ARE A STAR! +1!

    Theme Author webriti

    (@priyanshumittal)

    And theme???

    Thread Starter farnhamit

    (@farnhamit)

    Yeah all is fixed. 🙂

    Theme Author webriti

    (@priyanshumittal)

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘adding list to services box??’ is closed to new replies.