Group Admins

  • Profile picture of Steve

WordPress Troubleshooting and Support

Public Group active 4 months, 3 weeks ago ago

WordPress support from our community

Testing Code on a Mobile Device

This topic contains 0 replies, has 4 voices, and was last updated by  Steve 7 years ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
  • #1467

    Sheryl Blasnik

    I had a web developer help me out yesterday by placing code in my theme files so I could end each post with Follow Me buttons (Facebook, Twitter, Pinterest and RSS). The buttons are aligned in a horizontal row with links by using Shortcode at the end of each post which he wrote for me.

    Thought all was good but when I went to view the blog post on my IPhone late last night the shortcode was displayed as text in the blog post and all my social media icons were NOT on the post.

    When I view the post on an IPad 3 the buttons are aligned left and touching each other.

    Only on my Mac using Safari does everything look correct.

    Here is an example of the buttons in a post:

    How do I change the code so my red signature and the 4 buttons show up when viewing blog posts on a mobile device? Besides the obvious of owning a smartphone is there a way to “test” code to see what will happen when it is viewed on a mobile device? A plug-in that mirrors a mobile phone?


    Sheryl B.


    Margarete Koenen

    Did you get this fixed? It looked perfect in Chrome, Opera,on my ipad 2 and a mobile phone simulator.


    Sheryl Blasnik

    My IPhone is still showing only the short code as text – No red signature or gray social media buttons showing




    @Sheryl– Looks fine on my iPhone.Social buttons are a little tight, but the rest looks fine.


    Sheryl Blasnik

    @steve – How can that be? I am looking at the post on an IPhone 4 and the short code , [social media], is in text at the end of the post? I do not see my red signature or any buttons.

    Are you on a 4S?



    I see it on my iPhone too, Steve. Look right above the related posts at the bottom of the page. Looks like Sheryl’s using a mobile theme that doesn’t read the short code.



    I see it now! Sorry…

    Andrew is probably correct. Your main theme supports this [social-media] shortcode, and the mobile theme does not.

    The easiest route is to find the shortcode code in your main theme. Look for the add_shortcode function… probably in functions.php. Copy that code, and make your own plugin with it. Since plugins run for all themes, this would work.

    I know writing your own plugin may be scary, but it’s really not that bad. If you can find the shortcode code and post it on this site, we can help you write it.


    Sheryl Blasnik


    /* Add the main siteadmin menu item */
    $wp_admin_bar->add_menu( array( ‘id’ => ‘theme_options’, ‘title’ => THEME_NAME, ‘href’ => admin_url(‘themes.php’).”?page=”.THEME_FILE ) );
    $wp_admin_bar->add_menu( array( ‘parent’ => ‘theme_options’, ‘title’ => __( ‘Layout Options’, ‘magazine-basic’ ), ‘href’ => admin_url(‘themes.php’).”?page=”.THEME_FILE ) );
    add_action( ‘admin_bar_menu’, ‘add_menu_admin_bar’, 70 );

    // add social media
    // usage [social-media]
    add_shortcode(‘social-media’, ‘addSocialMedia’);
    function addSocialMedia() {
    return ‘
    Sheryl Blasnik



    DID I COPY THE CORRECT CODE FOR YOU TO HELP ME OUT?? Also can you change the code so the words FOLLOW ME are not as large in pixel size and take the : off after the words?

    Thanks so much!!!!



    Sheryl Blasnik

    @steve – I do not know how to prevent the code I paste from converting into images and just remain as code — Sorry…….



    @Sheryl– add it here, and give us the url:


    Sheryl Blasnik

    I signed up for an account at Pastebin as username SBlasnik

    Here is the URL after I pasted the code from my Functions.php file

    I labeled it as private members only and used the name Fashion Development Group for the Paste.

    Hopefully I did this correctly – Thanks



    @Sheryl– the code snippet needs to be PUBLIC not Private. If you just post the add_shortcode(‘social-media’, ‘addSocialMedia’) and the addSocialMedia function that should not be an issue.


    Sheryl Blasnik

    OK — I pasted it with the setting of Public


    Is that all you need to view it?




    -Remove the shortcode code from your FUNCTIONS.PHP file
    -copy this code to a separate file, and name it fdg-functions.php:
    -upload fdg-functions.php to your wp-content/plugins/ directory (since this is a plugin)
    -Activate it

    You should be good.

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

You must be logged in to reply to this topic.