mxpimp47
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] Autoptimize breaking some scriptsI added just
jquery.js
and all the errors went away. When you are logged in there are some console errors related to the admin bar stuff. But that shouldnt be as critical should it? I checked when logged out and there were none, and everything functioned as expected.
Forum: Plugins
In reply to: [Autoptimize] Autoptimize breaking some scriptsI have tried every combination I can think of from using full dir name to just js/main.min.js. I excluded jquery-ui.min.js too, and still couldnt get anything to change after save and clear cache. These are the files listed in console with errors –
jquery-ui.min.js?ver=4.1.1:5 Uncaught ReferenceError: jQuery is not defined
main.min.js?ver=4.1.1:1 Uncaught TypeError: Cannot read property ‘fn’ of undefined
bootstrap.min.js?ver=3.3:6 Uncaught Error: Bootstrap’s JavaScript requires jQuery
notes-common-v2.js?ver=3.4.1-201513:158 Uncaught ReferenceError: jQuery is not defined
admin-bar-v2.js?ver=3.4.1-201513:2 Uncaught ReferenceError: _ is not defined
autoptimize_06588244889d1af6479c9e81a1be3801.js:8 Uncaught TypeError: undefined is not a functionForum: Plugins
In reply to: [Autoptimize] Autoptimize breaking some scriptsThank you for the help, I read the FAQ, and added the exclude like this wp-content/themes/fmx/build/js/main.min.js, but it still didnt work. Even tried checking the box for try-catch wrapping. Is that not the correct way to exclude it?
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemYes, we can mark it resolved. I appreciate the help! I was just trying to fully understand what you meant, I was confused. Were you just simply stating that it will do what I wanted?
Thank you again for the help!
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemI dont know why I was thinking I needed a loop to display this. But I revised my code to this (with the third argument you mentioned) – http://pastebin.com/HHJcaUuH for anyone following along here. I needed to display 1 image and thats all I was saving via the custom meta (via the admin). When I reset the image field to nothing and save it, or upload a different image, it updates the DB.
Essentially that setup will return the same page every time.
I did want to return what ever image was stored in that meta field, cause it will only ever be one image since its used on the admin side, not page or posts. It is intended to be updated directly.
Does that clear any confusion up on that part?Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemI want to check to see if this is correct usage of the “post_per_page”, and including the
“post_type => page” to limit the post to show only one image (since there is only one used for the meta). I was trying to use posts_per_page without using post_type and it was returning two images. Then I set the post_type to page and it worked. Why is that?Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemI am not understanding you when you say “4th argument array”. I searched the codex, and dont see anything listed that way. I am sorry for my ignorance on this. But I have read the whole wp_query page in the codex and searched for what you mentioned and didnt find anything. Can you be more specific on where I need to read up? I literally googled “4th argument array wordpress” and didnt see anything relevant.
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemThat top one worked! Now I just need to apply an img class to what it echo’s. Since its a function returning the image, how to I get the img src to achieve the above?
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemIt dumped this- string(11) “Hello World”, but for “test-text” as you have above.
What I need is the test_image_id
var_dump( cmb2_get_option('fmx_options', 'test_image_id') );it dumped this – string(5) “11049”
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemIt’s to be displayed in a modal on the front end. I have used WP_Query for the other two different uses of cmb2 meta boxes.
So another custom query will fix this? Any examples using images? I was successful with other meta types but haven’t done a custom args array for attachments.Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemWhile still trying to figure this out, I was able to get a test_text type meta to return in a loop –
echo cmb2_get_option('fmx_options', 'test_text');my prefix for my custom admin meta is fmx
still cant get image to echo
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemHere it is in a loop – http://pastebin.com/UvRyu9sZ
Just to clarify I am using this file meta box in custom options page. Not a post or page.
Forum: Plugins
In reply to: [CMB2] echo the "file" meta box problemI think I tried to echo the line like you said too.
Forum: Fixing WordPress
In reply to: WP_Query with sticky postsI have made two queries like you suggested. One problem I have is I was using php count to insert a clearfix div for responsive purposes. Now with two queries its obviously not going to work correctly. Any suggestions on handling this?
Forum: Fixing WordPress
In reply to: WP_Query with sticky postsWould a conditional statement be better instead of two query’s?