BillyAtStudioPretty
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Thumbnail Editor] Update options errorSorry, I can’t remember how to replicate this error ??
can you supply a link to the site with the problem?
Otherwise there is no way of knowing what the problem is
I had this problem too.
You can fix it with css:
.social-ring + div { height: 1px; }
??
Forum: Plugins
In reply to: [Advanced Custom Fields (ACF?)] customizing custom fieldsI solved this myself by poking around in wp-admin/includes/media.php
function my_image_attachment_fields_to_edit($form_fields, $post) { $pte = pte_media_row_actions("", $post, ""); $pte = $pte['pte']; $form_fields["custom_sizes"] = array( "label" => __("Sizes"), "input" => "html", "html" => $pte ); return $form_fields; } add_filter("attachment_fields_to_edit", "my_image_attachment_fields_to_edit", null, 2);
Oh, and I am now running the site on an online staging server @ https://65.39.128.45/~apretty
Also, I am finding that add_footer_js() is being called twice, so each script is put into the footer twice.
I am having a similar problem, cause by facebook’s all.js returning this to the console:
FB.getLoginStatus() called before calling FB.init().
This is most likely because you aren’t loading the SDK asnchronously.
Can I suggest you try replacing<div id="fb-root"></div><script src="https://connect.facebook.net/<?php echo $this->options['facebook_language']; ?>/all.js#xfbml=1"></script>
in library.php (function add_footer_js()) with
<div id="fb-root"></div><script type="text/javascript"> FB.init({ appId : 'YOUR APP ID', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true, // parse XFBML oauth : true }); // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = \"//connect.facebook.net/<?php echo $this->options['facebook_language']; ?>/all.js#xfbml=1\"; ref.parentNode.insertBefore(js, ref); }(document)); </script>
I would like to have done this myself but I cannot find an app ID anywhere.
Also, in function add_footer_js(), you should only load the scripts that are necessary – using
if($this->options['social_X_button'] == 1) { //load script }
Thanks in advance,
BillyP.S please try and get back to me asap, thanks
Forum: Themes and Templates
In reply to: Loading all content for zero load time !Help!can someone PLEASE help?
Forum: Themes and Templates
In reply to: Loading all content for zero load time !Help!in the foreach loop, I changed the <? echo $page ?> to echo_r, which allows the page to load, but gives and error because I’m trying to use a std class object in an array. (I think?)
does anyone have a good way to get $pages (an array of objects) into js as an array of arrays?
Forum: Themes and Templates
In reply to: Loading all content for zero load time !Help!can anyone help me? I have encountered my first problem after attempting this, which is trying to get the array returned by get_pages into java script in order to utilize the content that i need.
I also realized that the page templates that I made for the theme have been rendered a bit redundant as I will be using JS to add/remove/change content. sigh.
anyway, I came up with this code, but the page refuses to load and I don’t know why.
<script type="text/javascript"> $(document).ready(function(){ pages = new Array(); <?php $pages = get_pages(); foreach ($pages as $page): ?> pages[<? echo $page->ID; ?>] = <? echo $page; ?>; <? endforeach; ?> }); </script>