Harold Angenent
Forum Replies Created
-
Forum: Plugins
In reply to: [Multiple content blocks] Can't create content block in footerHmm okay, strange. I’ve just tested under WP 3.9.1 and 4.0, seems to be working.
Forum: Plugins
In reply to: [Multiple content blocks] Can't create content block in footerThis could literally be anything, but I suspect the website doesn’t parse beyond header.php. Are you sure all lines of code are executed? Because if you turn off HTTP requests and visit the page (ánd all lines of code are executed), it’s almost impossible that the content blocks fails to register.
I have only seen this once where the admin side would run on HTTPS and the website didn’t. But in that cases, turning off HTTP requests worked as well.
Did you maybe change something in the permission to the content (for example: do users need to be logged in)?
Forum: Plugins
In reply to: [Multiple content blocks] Second Content Block BreaksHow about if you visit this post in the front-end? Or if you turn of HTTP requests at Settings > Multiple content blocks (and then visit the post)?
I have just tested 3.9.1 and 4.0alpha and it still seems to be working.
Forum: Plugins
In reply to: [Multiple content blocks] Second Content Block BreaksDo you mean when it’s not published yet? But just a Draft?
Forum: Plugins
In reply to: [Multiple content blocks] Content blocks not showing up in adminYou can always any kind of remove post type support with this function: https://codex.www.ads-software.com/Function_Reference/remove_post_type_support
Forum: Plugins
In reply to: [Multiple content blocks] Content blocks not showing up in adminNo problem, good luck
Forum: Plugins
In reply to: [Multiple content blocks] Content blocks not showing up in adminThat is strange, code seems OK. Do you get a notice by Multiple content blocks?
Can you try disabling HTTP requests at Settings > Multiple content blocks, and visit the page in the front-end?Forum: Plugins
In reply to: [Multiple content blocks] tag not workingThe last parameter was added from PHP 5.3. Maybe you have a lower version.
I’m glad to help you when there’s a problem / bug with my plugin, but this is just one of the implementations you could do with it. In my opinion, this is more PHP support.
I think I’ve given you a lot of pointers for where to look, but I’m afraid I don’t have time to answer all PHP support questions. Good luck!
Forum: Plugins
In reply to: [Multiple content blocks] tag not workingSocke,
How about
<?php echo strstr( get_the_block('unterer_block_2'), '<!--more-->', true ); ?>
?Forum: Plugins
In reply to: [Multiple content blocks] tag not workingThere is no need to edit the plugin, instead of
the_block( 'Blockname' );
you can try something likeecho wp_trim_words( get_the_block( 'Blockname'), 40 );
.If you put it in your template, a plugin update won’t overwrite it. Good luck!
Forum: Plugins
In reply to: [Multiple content blocks] tag not workingNo, but this is how the WordPress
the_content
function works. If you want the same thing for a custom block, you should replicate that code.So that ‘hack’ won’t work on MCB, since it doesn’t replicate the
the_content
function by default.If you want to show part of a content block, you could use the function
wp_trim_words
: https://codex.www.ads-software.com/Function_Reference/wp_trim_wordsForum: Plugins
In reply to: [Multiple content blocks] tag not workingActually, no. MCB uses the same filters as the normal content. The content seems to be removing the rest on its own.
That means you should use code to show part of the content block. Maybe you can take a look at https://core.trac.www.ads-software.com/browser/tags/3.8.1/src/wp-includes/post-template.php#L180?
Forum: Plugins
In reply to: [Multiple content blocks] Content Block item no longer appears in admin menuI’m not sure what you mean, since there isn’t (and never was) a link to create new content blocks and there wasn’t a widget either. Can you elaborate your problem a little more?
Are you sure you’ve got the right plugin?
Forum: Plugins
In reply to: [Multiple content blocks] Exclude from Custom Post TypeYou can try going to Settings > Multiple content blocks and disable HTTP requests. This will require you to manually visit a page (or post or CPT) to initialize which blocks there are on a page.
Whenever MCB is not used in a certain template, it should be hidden automatically. So if you use another template for a post type (which does not have
the_block
in it, this should work.Forum: Plugins
In reply to: [Multiple content blocks] Transfer block information to arrayOkay.. this is kind of a PHP question and unrelated to our plugin, but I can give you some pointers:
$postal_codes = get_the_block( 'Postal codes' ); //Or whatever the name is $postal_codes = explode( ',', $postal_code ); //Comma separated