shortcode change variable base on user

If this works for you in the template: $s=”[cfdb-table form=”Contact form 1″ show=”Submitted Login,your-email,your-message” search=”AndrewA”]”; echo do_shortcode($s); then you could try: global $current_user; get_currentuserinfo(); $s = sprintf(‘[cfdb-table form=”Contact form 1″ show=”Submitted Login,your-email,your-message” search=”%s”]’,$current_user->display_name); echo do_shortcode($s);

Changing layout of defaul gallery output to masonry

try it like this: $.each($(‘.gallery img’), function () { var rndmnum = Math.floor((Math.random()*11)+1); rndmnum = rndmnum *20 + 260; $(this).css({ ‘max-width’ : rndmnum }); }); note: untested sources: https://stackoverflow.com/questions/8904707/javascript-random-number-between-15-and-225-increments-of-30 https://stackoverflow.com/questions/8733838/random-max-width-for-each-image-on-a-page edit: corrected calculation

Custom shortcode that writes to file

Your code works for me on a development server. As is, it saves to the site root directory. My guess is that you are trying to write to a directory to which the server does not have write access. I would suggest saving to wp-content/uploads or some other directory where you should reasonably have write … Read more

load plugin with ajax [duplicate]

looking at the html output of the plugin code, i can say u that the plugin loads everything else (textarea and history) with javascript (see all those data- attributes and loading message). Now if the call to function was made on page load(non-ajaxy way), the plugin would have loaded requried javascript files and then things … Read more

Shortcode or placeholder for theme options page?

I am using shortcodes. But you need to work differently with this and make it easier for the client. On the theme options page you should have inputs with type=”checkbox” where the client chooses what share buttons to appear. In the template you should get the option with get_option(‘registered_option’) and display those buttons for which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)