In September 2016 the author announced that this plugin is no longer supported, as has been removed from the WordPress Plugin Directory.
His announcement his here:
https://micuisine.com/content-block-plugins/global-content-blocks/
If you find a nice alternative plugin, please post below.
]]>Hi,
Since the WordPress update to 4.7.2 the GCB insert button in the TinyMCE-editor is not working. In my console I’m getting the following error:
Uncaught SyntaxError: Unexpected token return
getgcb.php?a=1:1
Uncaught ReferenceError: do_s is not defined at HTMLButtonElement.onclick
(getgcb.php?a=1:1)
Can somebody help me with an update of fix?
Thanks in advance.
Sincerely,
Stef Dijkstra – [email protected]
Somebody know where disappeared Global Content Blocks ?
]]>I love Global Content Blocks! One of my sites I’m having a weird problem. It works okay when I call the block’s number, like [contentblock id=35], but it throws this error when calling the same one via its custom name, like [contentblock id=footertext]:
Warning: strlen() expects parameter 1 to be string, array given in /wp-content/plugins/global-content-blocks/gcb/gcb.class.php on line 36
I really don’t want to go through all of my pages and replace the code with the number — is there an easy fix for this?
Thanks in advance!
-Todd
]]>Hi
When I paste VC Carousel code into this, the carousel is replaced with all images showing but not in a carousel, can anyone help?
Thanks
]]>All the links to micusine are broken, so much of the help, advanced stuff is broken
]]>Hi,
is there any advanced code so that i can use inline?
i mean, in the middle of a paragraph i want to add a sentence in the middle of a paragraph without adding white lines etc.
tnx for helping!
]]>Hi,
for my site I use at the bottom of posts (travel site) something like this:
Have you been to this place? Please share your experiences in the comments!
I would like to “this place” be variable. Can i do that? for example:
Have you been to [placeshortcade]? Please share your experiences in the comments!
and then use a code like this:
[contentblock id=comment]USA[/contentblock]
?
and it gets replaced by USA?
couldn’t find this in the documentation?
maybe; to get the plugin to the next level even add some conditional stuff?
]]>I want to insert a mixture of PHP and HTML for a form. I inserted the following code I took directly from my working contact us page template and pasted into a raw HTML shortcode field.
The form sends a message to my email address correctly but the validation/response message that normally appears at the top is missing.
It’s the bit called by
<?php echo $response; ?>
<?php
//response generation function
$response = "";
//function to generate response
function my_contact_form_generate_response($type, $message){
global $response;
if($type == "success") $response = "<div class='callout success'><p>{$message}</p></div>";
else $response = "<div class='callout error'><p>{$message}</p></div>";
}
// response messages
$not_human = "Are you sure you're human? We can't tell. Please do the sum below to confirm.";
$missing_content = "It looks like we are missing something. Please chek the form below.";
$email_invalid = "That email Address doesn't look right. Please double check it";
$message_unsent = "Your message wasn't sent. Please have another go. If it still doesn't work then please call us using the number supplied.";
$message_sent = "Thank you for your enquiry. We will be in contact shortly.";
// user posted variables
$business_name = $_POST['message_business_name'];
$first_name = $_POST['message_first_name'];
$last_name = $_POST['message_last_name'];
$email = $_POST['message_email'];
$phone = $_POST['message_phone'];
$message = $_POST['message_text'];
$lead_source = $_POST['message_lead_source'];
$human = $_POST['message_human'];
$location = $_POST['location'];
$body = " This message was sent from intY.com $location \n\nBusiness name: $business_name \nName: $first_name \nName: $last_name \nEmail: $email \nPhone: $phone \n\n Lead source: $lead_source \n\nMessage: \n\n$message";
//php mailer variables
$to ="[email protected]";
$subject = "Someone sent a message from ".get_bloginfo('name');
$headers = 'From: '. $email . "\r\n" .
'Reply-To: ' . $email . "\r\n";
if(!$human == 0){
if($human != 2) my_contact_form_generate_response("error", $not_human); //not human!
else {
//validate email
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
my_contact_form_generate_response("error", $email_invalid);
else //email is valid
{
//validate presence of name and message
if(empty($first_name) || empty($message)){
my_contact_form_generate_response("error", $missing_content);
}
else //ready to go!
{
$sent = wp_mail($to, $subject, strip_tags($body), $headers);
if($sent) my_contact_form_generate_response("success", $message_sent); //message sent!
else my_contact_form_generate_response("error", $message_unsent); //message wasn't sent
}
}
}
}
else if ($_POST['submitted']) my_contact_form_generate_response("error", $missing_content);
?>
<?php echo $response; ?>
<form class="marketing" action="<?php the_permalink(); ?>" method="post">
<legend>General enquiries</legend>
<fieldset>
<label class="form-group required wow fadeIn">
<span>Business name:</span>
<input type="text" name="message_business_name" value="<?php echo esc_attr($_POST['message_business_name']); ?>" required />
</label>
<label class="form-group required wow fadeIn">
<span>First name:</span>
<input type="text" name="message_first_name" value="<?php echo esc_attr($_POST['message_first_name']); ?>" required />
</label>
<label class="form-group required wow fadeIn">
<span>Last name:</span>
<input type="text" name="message_last_name" value="<?php echo esc_attr($_POST['message_last_name']); ?>" required />
</label>
<label class="form-group required wow fadeIn">
<span>Email:</span>
<input type="text" name="message_email" value="<?php echo esc_attr($_POST['message_email']); ?>" required />
</label>
<label class="form-group required wow fadeIn">
<span>Phone number:</span>
<input type="text" name="message_phone" value="<?php echo esc_attr($_POST['message_phone']); ?>" required />
</label>
<label class="form-group required wow fadeIn">
<span>Message:</span>
<textarea type="text" name="message_text" required><?php echo esc_textarea($_POST['message_text']); ?></textarea>
</label>
<label class="form-group required wow fadeIn">
<span>Where did you hear about us:</span>
<select name="message_lead_source" id="id_lead_source">
<option value=""> </option>
<option <?php if ($_POST['message_lead_source'] == 'Advert') { ?>selected="true" <?php }; ?> value="Advert">Advert</option>
<option <?php if ($_POST['message_lead_source'] == 'Cold Call') { ?>selected="true" <?php }; ?> value="Cold Call">Cold Call</option>
<option <?php if ($_POST['message_lead_source'] == 'Direct Mail') { ?>selected="true" <?php }; ?> value="Direct Mail">Direct Mail</option>
<option <?php if ($_POST['message_lead_source'] == 'Email Campaign') { ?>selected="true" <?php }; ?> value="Email Campaign">Email Campaign</option>
<option <?php if ($_POST['message_lead_source'] == 'Partner Referral') { ?>selected="true" <?php }; ?> value="Partner Referral">Partner Referral</option>
<option <?php if ($_POST['message_lead_source'] == 'PR') { ?>selected="true" <?php }; ?> value="PR">PR</option>
<option <?php if ($_POST['message_lead_source'] == 'Seminar') { ?>selected="true" <?php }; ?> value="Seminar">Seminar</option>
<option <?php if ($_POST['message_lead_source'] == 'Trade Show') { ?>selected="true" <?php }; ?> value="Trade Show">Trade Show</option>
<option <?php if ($_POST['message_lead_source'] == 'Web') { ?>selected="true" <?php }; ?> value="Web">Web</option>
<option <?php if ($_POST['message_lead_source'] == 'Webinar') { ?>selected="true" <?php }; ?> value="Webinar">Webinar</option>
<option <?php if ($_POST['message_lead_source'] == 'Word of mouth') { ?>selected="true" <?php }; ?> value="Word of mouth">Word of mouth</option>
<option <?php if ($_POST['message_lead_source'] == 'Other') { ?>selected="true" <?php }; ?> value="Other">Other</option>
</select>
</label>
<label class="form-group required wow fadeIn">
<span>Human verification:</span>
<input type="text" style="width: 60px;" name="message_human" required value="<?php echo esc_attr($_POST['message_human']); ?>" title="Hint: The answer is 2" /> + 3 = 5
</label>
<label class="form-group required wow fadeIn">
<button type="submit" class="button">Send enquiry</button>
<input type="hidden" name="location" value="contact us page" />
<input type="hidden" name="submitted" value="1" required />
</label>
</fieldset>
</form>
I tried pasting as code and as PHP but neither worked.
]]>I am unable to edit existing content blocks or create new ones. viewing the source of the plugin page shows that the text area containing my copy/code has the style visibility=”hidden” on it. Additionally the editing buttons are missing and “ReferenceError: pum_shortcode_ui is not defined” shows up in my JS console. Any ideas?
]]>I am getting the following error messages. I had to deactivate the plugin as it broke my site and admin access
Warning: session_start() [function.session-start]: open(/home/content/58/9228758/tmp/sess_ru85g47tdoms761a0m0lv8hfi2, O_RDWR) failed: No such file or directory (2) in /home/content/58/9228758/html/wp-content/plugins/global-content-blocks/global-content-blocks.php on line 302
Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at /home/content/58/9228758/html/wp-content/plugins/global-content-blocks/global-content-blocks.php:302) in /home/content/58/9228758/html/wp-content/plugins/global-content-blocks/global-content-blocks.php on line 302
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/58/9228758/html/wp-content/plugins/global-content-blocks/global-content-blocks.php:302) in /home/content/58/9228758/html/wp-content/plugins/global-content-blocks/global-content-blocks.php on line 302
]]>After upgrading to WordPress 4.5.2, I have been getting the following error. I am on Godaddy Managed WordPress Hosting, and their support says that it is related to the plugin.
Warning: Class __PHP_Incomplete_Class has no unserializer in /home/content/p3pnexwpnas10_data01/28/2536428/html/wp-content/object-cache.php on line 520
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/p3pnexwpnas10_data01/28/2536428/html/wp-content/object-cache.php:520) in /home/content/p3pnexwpnas10_data01/28/2536428/html/wp-content/plugins/global-content-blocks/global-content-blocks.php on line 302
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/p3pnexwpnas10_data01/28/2536428/html/wp-content/object-cache.php:520) in /home/content/p3pnexwpnas10_data01/28/2536428/html/wp-content/plugins/global-content-blocks/global-content-blocks.php on line 302
https://www.ads-software.com/plugins/global-content-blocks/
]]>
The link for GCB Advanced Usage is broken and I really miss it!
]]>First, thanks so much for the plugin. I find it very much “as advertised,” as well as very useful and reliable.
I have either discovered a bug or have a minor conflict.
I’m using GCB 2.1.5 in WP 4.3.1 MultiSite, with 9 other active plugins. Over 2 sites using different themes, I have 59 Content Blocks and 37 pages (no blogs).
The behavior I see is this: If, at the point of saving a new Content Block the first time, I hit Update instead of Save & Close, my new block gets saved correctly, but the page refreshes to GCB ID #1 instead of the block I just “updated.” I like “Update” better than “Save & Close,” because I preview live immediately and usually find at least a couple of typos. After the first save, both “Save & Close” and “Update” work correctly.
This issue is not a handicap (though I’ve been glad, a couple of times, that I save off-line copies); but it made me wonder whether I’m the only one who likes to “update” brand new blocks.
Again, great plugin!
i thought this was fixed, but apparently not
if you log on to the backend using ssl and you click on a GCB to edit it, you are redirected to http
]]>I migrated my site in localhost machine with All-in-One WP Migration plugin.
All the process worked ok except for all blocks disappeared in local version.
If I create new blocks it starts counting by the last old block created [contentblock id=13] and if I check in the database, all the data are present in the wp_options table. How can I fix this without re-import all blocks?
I’m sorry and I’m sure it’s just me.
My aim is to export-import a set of Global Content Blocks from one WP-installation to another. Both installations have the GCB plugin installed and activated.
As admin on WP-install number 1, I view the list of blocks on the admin page Global Content Blocks (php?page=global-content-blocks). I select one or more blocks and click the button ‘Export selected’. My browser downloads a ‘.gcb’ file. I save the file locally.
As admin on WP-install number 2, I view the list of blocks on the admin page Global Content Blocks (php?page=global-content-blocks). The list is empty. I look for an ‘Import’ button but can’t seem to find it.
I know I’m missing something really obvious here. But what?
Cheers.
]]>I just experienced a catastrophic failure. I’ve been building my site for the last few weeks and heavily relying on the Global Content Blocks plugin. Everything was working fine. I logged into my WP admin this morning to continue working and ALL of my blocks have been erased. I did not activate/deactivate the plugin, I did not delete it, I did not enable the uninstall option in the settings, nothing. Just poof, it’s all gone. Is there any way to retrieve all of my saved blocks? Where in the SQL database should I look?
]]>Hi there.
I think your plugin is so good that I donated. Thanks for continuing to support this invaluable plugin!
I’m banging my head against the TinyMCE wall at the moment. It’s now adding <p> tags to GCB Code blocks and I can’t stop it. Every time I return to edit the code WP/TinyMCE is reverting to the Visual editing mode rather than Text. It then adds <p> tags and also reformats some of the tag structures.
I also had to abort a php block that had inline html and js due to the above issue. I ended up authoring a custom template because of the reformatting.
You have my vote for a way to disable TinyMCE in GCB. A text area are would suffice for me personally.
Any ideas?
Cheers.
]]>Hello, this is a bit of a weird problem for me. I have been using GCB for some years now and everything was going fine until a few updates ago, I think sometime either in December or January, something changed with the newer versions.
Problem: For some reason, the content blocks that have adsense code in them suddenly add a couple
lines between the adsense code.
I didn’t change anything and when you view the content block code, it shows no
but when a post/page is posted, the script ads the
which results in the content block being pushed down and a big empty white space above it because of the
tags.
How can I resolve this? Where should I start investigating?
]]>Hi –
Trying out your plugin right now and i’m seeing a lot of PHP notices about undefined variables.
Best practice would be to enable WP_DEBUG while developing plugins.
BR from Salzburg,
– Johannes
]]>Hi Dave, when I edit a Content Block, sometimes the <p>
tag is added to the block.
For example, if the content of a block is another block like [contentblock id=other]
. If it is opened on the Visual tab, when I move to the Text tab I see <p>[contentblock id=other]</p>
If I reload the page (without making any change), the block is loaded on the Text tab, and the tags are not added. So, it is a bug when the block is loaded on the Visual tab.
]]>Hello! Love the plugin.
I have a very simple snippet of HTML for a call to action that I drop on the bottom of each page. However, when the code is outputted, it includes a <p><span></span></p> above my HTML. There is nothing in the HTML tab above my code. What’s going on? How do I get rid of this?
Thanks!!
]]>Will this plugin support the Yoast SEO page analysis plugin at any point?
Thanks,
Rob
It would be so amazing if I could place a global content block via an Advanced Custom Fields field. Then my clients could rearrange just a template or two as they see fit to create different layouts – avoiding multiple similar templates, or having to edit the PHP in the templates themselves. Does this by any chance already exist???
]]>In the readme.txt, change Contributors: Dave Liske
for Contributors: delmarliske
in order to correctly show the author in the plugin’s front page.
Also, the “Settings” link in the Plugins page is wrong. It points to “/wp-admin/options-general.php?page=global-content-blocks” and it should be “/wp-admin/admin.php?page=global-content-blocks”.
]]>hi there
i want to insert multiple content blocks at once (full content, not shortcode) instead of one at a time.
is there a way to accomplish that? i would be happy to hear back soon or i would have to look for another application since my client really need this function.
Is there a way to use the GCB plugin to add custom script to /wp-admin/index.php ?
If not, can someone point me to a plugin that would provide this functionality?
]]>Thank you for the fantastic plugin. I love it and I use it on my website.
While I was diagnosing problems with my RSS feeds (described in the thread “PHP errors”) I deactivated several plugins, including GCB, to see if it helps.
I have sorted it eventually out, but then I noticed that content block ID 1 got missing. I had contentblocks 1 to 1, but after a few deactivations and activations of your plugin I had only 2 to 4. I tried to create a new one, but it got ID 5.
It is not a problem to recreate it, but how can I get ID 1 back? I have in about 50 places on my website the code to use contentblock 1, so I would love to be able to have it back, instead of to change all of those pages.
So while I thank you for your support, I would like to ask you to verify, how it was possible that one block got missing, and – how can I get back my block ID 1 after it got lost?
Thank you in advance and all the best for you and your family in 2016 ??
]]>I have tons of following PHP errors:
[29-Dec-2015 18:37:02 UTC] PHP Fatal error: Cannot redeclare image_url() (previously declared in /home/account/wp-content/plugins/global-content-blocks/global-content-blocks.php(248) : eval()’d code:1) in /home/account/wp-content/plugins/global-content-blocks/global-content-blocks.php(248) : eval()’d code on line 5
Any help on that?
Thanks for this fantastic plugin!
]]>