I inserted mobile carousel code below in custom function

I inserted mobile carousel code below in custom function file at http://icecast.pro/about - but something is off, appreciate any suggestions.

if ( wp_is_mobile() ) {
if ( function_exists( ‘soliloquy_slider’ ) ) soliloquy_slider( ’320×220-mobile’ );

  • Imperative Ideas

    Your problem may be that an error in mobile_main.js is causing the JS to stop processing within the bb_trigger_mobile_repaint() function. I'd clear up the current console errors before digging too hard into bolt-on features.

    A further suggestion -

    When developing a mobile feature, remove is_mobile() until you know it's working. It is nearly impossible to troubleshoot an app with a mobile device so in order.

    1. Remove is_mobile() until it works properly, then add it back in
    2. Clear up the JS console errors
    3. Now let's have a look at your PHP log

    In wp_config.php, replace your error logging code with the following:

     * For developers: WordPress debugging mode.
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);

    Now, as PHP errors occur, they will log to "debug.log" inside of /wp-content/. Once you clear all of the major errors (not depreciated code warnings from plugins but actual broken stuff) then set define('WP_DEBUG', false); in order to stop writing the file.

    If your PHP log and console log are clear and its still doesn't work, you have a CSS or JS targeting error in your code that isn't related to a broken function.

  • buddha

    Thank you. The PHP & console logs are clear. Below is my latest attempt, but still no change.

    Re truck/nissan analogy, I chose "Advanced" Wordpress question, not "Beginner". Also, it is not the first time that a support person has asked a question, and then marked the issue as resolved when it clearly is not.

    I don't like giving somebody an "unhelpful" rating, but shutting down an unresolved issue is not helpful. In fact, your effort is the most helpful attempt I have received in the last week.


    I created a custom page template called about-carousel.php from page-fullwidth.php, located in buddyboss directory, using code below, and chose the custom template “About Carousel” in the “about” page at http://icecast.pro/about – nothing shows

    * Template Name: About Carousel
    * Description: Use this page template for a page with no sidebars.
    * @package WordPress
    * @subpackage BuddyBoss
    * @since BuddyBoss 1.0
    get_header(); ?>

    <div class=”page-full-width”>

    <div id=”primary” class=”site-content”>
    <div id=”content” role=”main”>

    <?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( ‘content’, ‘page’ ); ?>
    <?php comments_template( ”, true ); ?>
    <?php endwhile; // end of the loop. ?>

    </div><!– #content –>

    <?php if(is_page( ‘about’ )){ ?>
    if ($(‘#mobile-check’).is(‘:visible’)){
    echo ‘[soliloquy id="235"]‘;
    } else {echo ‘[soliloquy id="156"]‘;}
    <?php } ?>

    </div><!– #primary –>

    </div><!– .page-full-width –>
    <?php get_footer(); ?>

  • Imperative Ideas

    Most WordPress slider plugins come with a widget.

    Generally speaking, I've found it much simpler to declare a widget zone (in your case call it "about_slider" or something), throw a mobile check on it (for your example), then drag the widget into the about-slider sidebar in the admin.

    Kind of bypasses the whole problem of a hard-coded ID while also making it easy for the client to update in the future.

    I haven't personally worked with Soliloquy. For a single-page application, I'd prefer to create a repeater-field for images in wp-types or advanced custom fields, declare a new thumbnail size in functions, then pull the repeater images into a jQuery plugin. That way I can conditionally load the JS and CSS only as needed on that page.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.