Forum Replies Created

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • in reply to: Homepage not Displaying Correctly #1186576

    The situation is as follows:

    When someone visits the website using the .COM name, I have been using a custom page template in the child theme directory in order to direct a desktop visitor to a desktop home page. If the visitor is a mobile device, I am directing someone to a different, mobile-friendly page.

    In the theme options, the initial page to load is the page that refers to the custom page template. However, the PHP code in the custom template is no longer working.

    The code in the page template is as follows:

    <?php
    if(wp_is_mobile()) {
      header("Location: https://namzcustomcycleproducts.com/mobile-splash/");
      exit();
    }
    else {
      header("Location: https://namzcustomcycleproducts.com/desktop-home");
      exit();
    }
    in reply to: Page not Displaying Correctly #1128059

    I ended up having to visit the media gallery within WordPress. I changed the pixel dimensions for specific images, to then visit these same images again to do a “restore original image”. Once I did the “restore image” process, the page displayed correctly again. I am not sure why I had to visit these images specifically to do this, so if you can explain why I had to do this, that would be great.

    in reply to: Page not Displaying Correctly #1127987

    This website was displaying correctly for years. Why all of a sudden is this page displaying like this? Did some update come along and cause this ?

    • This reply was modified 5 years, 4 months ago by JZNAMZ.
    in reply to: Adjusting Logo and Header on Mobile #961857

    I am getting closer to the desired result.

    I want to hide the hamburger menu on this specific page.

    I tried using the following code within the quick CSS and within the media query for 767px.

    .page-id-4988 .responsive #top #wrap_all .main_menu {
    display: none;
    }
    in reply to: Adjusting Logo and Header on Mobile #961838

    I removed the quick CSS as mentioned, but the logo is not appearing as wide as the slideshow.

    The logo is in the upper-left portion of the viewport.

    Can I get the logo to appear centered and to appear as wide as the slideshow (on this mobile-only page)?

    The mobile page is located at:
    https://new.namzcustomcycleproducts.com/staging/mobile-splash

    in reply to: Adjusting Logo and Header on Mobile #960836

    I just realized that I can not include the logo as a page element because the hamburger menu doesn’t display correctly.

    I need to have the logo display centered and full width in the header.

    in reply to: Adjusting Logo and Header on Mobile #960833

    If I add some more CSS to set the z-index to 1 for the header, the logo placed as a page element now displays as a complete image.

    I would rather do some modifications that go along with the theme architecture.

    Let me know what other approach can accomplish this reliably for all mobile devices.

    @media only screen and (max-width: 767px) {
    .responsive #top .logo {
    margin-top: 15px;
    }
    .responsive .logo img {
    display: none;
    }
    .responsive #top #wrap_all #header {
    z-index: 1;
    }
    in reply to: Adjusting Logo and Header on Mobile #960817

    I can use the following code to hide the logo based on a CSS media query. If I then put the logo onto the page using the page builder, the logo is blocked by portions of the header.

    @media only screen and (max-width: 767px) {
    .responsive #top .logo {
    margin-top: 15px;
    }
    .responsive .logo img {
    display: none;
    }
    }

    Link to mobile sample page:
    https://new.namzcustomcycleproducts.com/staging/mobile-splash

    in reply to: Adjusting Logo and Header on Mobile #960795

    I updated the theme today to the latest version, and now the logo is not correct on a specific page that only shows on mobile. The graphic above shows the logo on the left with the hamburger menu on the right. The page now looks like the image above, but I want to have the logo appear as wide as the white rectangle of the slider.

    I forget what I had modified before, but I was able to have the logo appear at the same width as the white rectangle of the image slider, and once the logo was enlarged to this size, the hamburger menu was able to appear in the black space above the letter “Z” in the logo.

    The sample mobile page is located at:

    new.namzcustomcycleproducts.com/staging/mobile-splash

    in reply to: Using Meta for Facebook Open Graph #958793

    I tried using some PHP code that I had found on the Internet. I ended up removing this particular code from the child theme functions.php file, and I started using the Yoast SEO plugin. The Yoast plugin seems to provide the meta functionality for Facebook.

    Here is the code that did not seem to work:

    function add_opengraph_doctype( $output ) {
            return $output . ' xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"';
        }
    add_filter('language_attributes', 'add_opengraph_doctype');
     
    //Lets add Open Graph Meta Info
     
    function insert_fb_in_head() {
        global $post;
        if ( !is_singular()) //if it is not a post or a page
            return;
            echo '<meta property="fb:admins" content="1600152201"/>';
            echo '<meta property="og:title" content="' . get_the_title() . '"/>';
            echo '<meta property="og:type" content="article"/>';
            echo '<meta property="og:url" content="' . get_permalink() . '"/>';
            echo '<meta property="og:site_name" content="Namz Custom Cycle Products"/>';
        if(!has_post_thumbnail( $post->ID )) { //the post does not have featured image, use a default image
            $default_image="https://new.namzcustomcycleproducts.com/staging/wp-content/uploads/2018/05/namz-fb.jpg"; //replace this with a default image on your server or an image in your media library
            echo '<meta property="og:image" content="' . $default_image . '"/>';
        }
        else{
            $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
            echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src[0] ) . '"/>';
        }
        echo "
    ";
    }
    add_action( 'wp_head', 'insert_fb_in_head', 5 );
    in reply to: Displaying Slider via PHP #952611

    I put a one-pixel, blank slider on the page using the advanced layout builder. The results are a little different. I was seeing a blank area where the slider should appear. Now, I am seeing every image stacked vertically as a still image, but no slider is running.

    The sample page is located at:

    https://staging.namzcustomcycleproducts.com/dave1/

    in reply to: Displaying Slider via PHP #952598

    Here is one attempt that did not work:

    <?php /* Template Name: Dave */
    require('../wp-load.php');
    ?>
    <style type="text/css">
        body {
            background: #000;
            }
        #namz-container-1 {
            width: 100%;
            height: auto;
        }
        #namz-wrapper {
            width: 90%;
            margin: 0 auto;
            }
        #namz-logo {
            background-image: url(https://staging.namzcustomcycleproducts.com/wp-content/uploads/2018/04/namz-logo-PNG-636x245.png);
            background-position: center;
            background-repeat: no-repeat;
            height: 300px;
            width: 100%;
            }
        #namz-slider {
            margin: 0 auto;
            }
    </style>
    <div id="namz-container-1">
    <div id="namz-wrapper">
    <div id="namz-logo"></div>
    <div id="namz-slider">
    <?php echo do_shortcode('[layerslider id="4"]'); ?>
    </div>
    </div>
    </div>
    
    in reply to: Displaying Slider via PHP #952593

    I have a page that I am building in PHP. I am not using the WordPress dashboard. I simply want to use PHP to display a slider where I want to display slider. I can not get any PHP code to cause a slider to display. Why?

    in reply to: Displaying Slider via PHP #952558

    I tried using a do_shortcode before I posted the issue. I tried the function with and without the av_ prefix as well.

    What can I do to get a visible slider by way of the template file ?

    in reply to: Displaying Video in One Fold #950516

    Is there no way I can calculate the viewport size of the visitor on page load, and then calculate the available space for the video based on the sizes of everything else that gets placed on the page, and then insert the video at the calculated dimensions for the remaining space?

    in reply to: Adjusting Logo and Header on Mobile #950514

    Screenshot of Mobile Page

    I want the logo that appears in the upper-left corner to be as wide as the slider, so the logo should be equally as wide as the white background you see being the slider. And the hamburger menu should sit precisely or float in the black space about the letter “Z” in the NAMZ part of the logo.

Viewing 16 posts - 1 through 16 (of 16 total)