• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Centric Pro Social Media API call/requests

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Centric Pro Social Media API call/requests

This topic is: resolved

Tagged: Ajax, centric pro

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 2 months ago by bluebird.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 20, 2017 at 2:11 pm #199752
    bluebird
    Member

    Hi,

    I am working with the Centric Pro theme and I am attempting to create several API callback requests from several social media sites to display likes and followers. Instead of creating a separate page template, I have decided to display the results on the front page via the 3rd available widget (that is where I put the HTML with it's associated #wrapper id). I have two javascript files queued via functions.php like so:

    wp_enqueue_script( 'social-counters', get_stylesheet_directory_uri() . '/js/socialCounters.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script( 'social-counter-functions', get_stylesheet_directory_uri() . '/js/socialCounterFunctions.js', array( 'jquery' ), '1.0.0', true );

    
    
    So far so good (for the social media sites that I have registered applications &/or acquired access tokens), though Twitter requires two additional php files to be functional and I am not certain how to queue them properly (I'm still relatively new at this).  What I have tried so far is to place a Twitter folder in the root of the Centric Pro theme, along with this code in the functions.php (which shows no errors in the console, but is not working):
    
    

    function link_twitter() { ?>
    <script>
    jQuery(function($) {
    console.log("here");
    $('.home').load('twitter/index.php');
    $('.home').load('twitter/twitterAPIExchange.php');
    alert("finished loading");
    });
    });
    </script>
    <?php }
    `

    Could anyone tell me if I am on the right track? I've searched around quite a bit and have not been able to find a solution.

    Here is the site that I'm working on:

    http://testing.firebugmusic.com

    Another thought had just crossed my mind: Could the reason that the Twitter API call fails be related to my sub-domain being http rather than https? I did try all of the associated code in another (non-Wordpress) test site via a local MAMP server and it works there when I test it locally.

    Thanks in advance to anyone who can help!

    http://www.testing.firebugmusic.com
    January 22, 2017 at 9:29 am #199791
    Victor Font
    Moderator

    Duplicate post: http://www.studiopress.community/topic/test-2/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    January 28, 2017 at 11:57 am #200188
    bluebird
    Member

    Oops!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Centric Pro Social Media API call/requests’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble