Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter estudi33

    (@estudi33)

    Sorry, I forgot about another issue!!

    He has also appeared a white line under the featured pages that I would like to delete.

    Thank You for your help!!

    White line:

    .marketing .featurette-divider {
    display: none;
    }

    Did you edit this:

    $my_item_order = array(
            'title',
            'image',
            'text',
            'button',
        );

    Thread Starter estudi33

    (@estudi33)

    Code don’t work. The white line is still there.

    Thread Starter estudi33

    (@estudi33)

    Yes, here is the code I put on functions.php

    add_action('wp_footer' , 'set_fp_item_order');
    function set_fp_item_order() {
        $my_item_order = array(
            'title',
            'image',
            'text',
            'button',
        );
        ?>
        <script type="text/javascript">
            jQuery(document).ready(function () {
                ! function ($) {
                    //prevents js conflicts
                    "use strict";
                    var my_item_order = [<?php echo '"'.implode('","', $my_item_order).'"' ?>],
                     $Wrapper = '';
    
                    if ( 0 != $('.widget-front' , '#main-wrapper .marketing' ).length ) {
                     $Wrapper = $('.widget-front' , '#main-wrapper .marketing' );
                    } else if ( 0 != $('.fpc-widget-front' , '#main-wrapper .fpc-marketing' ).length ) {
                     //for FPU users
                     $Wrapper = $('.fpc-widget-front' , '#main-wrapper .fpc-marketing' );
                    } else {
                     return;
                    }
    
                    $Wrapper.each( function() {
                        var o            = [];
                        o['title']   = $(this).find('h2');
                        o['image']   = $(this).find('.thumb-wrapper');
                        o['text']    = $(this).find('p');
                        o['button']  = $(this).find('a.btn');
                        for (var i = 0; i < my_item_order.length - 1; i++) {
                           o[my_item_order[i]].after(o[my_item_order[i+1]]);
                        };
                    });
                }(window.jQuery)
            });
        </script>
        <?php
    }

    .featurette-divider {
    display: none;
    }
    Thread Starter estudi33

    (@estudi33)

    Perfect!! The white line has disappeared.

    Can you help me to change the position of the titles featured pages?

    Thank you very much!!

    Hello,
    in the snippet you’re using replace :
    '#main-wrapper .marketing'
    with just:
    '.marketing'

    Thread Starter estudi33

    (@estudi33)

    Hello!

    Thank you very much. It works perfectly!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Modify title position of featured pages’ is closed to new replies.