Creating Custom Featured Block style not working

Home Forums Legacy Support Support queries Setup issues Creating Custom Featured Block style not working

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #130750
    learner4life
    Participant
    Hello I am trying to create a custom featured block but it's not working here is my code: <?php if(!class_exists('WPLMS_Customizer_Plugin_Class')) { class WPLMS_Customizer_Plugin_Class  // We'll use this just to avoid function name conflicts { public function __construct(){ add_filter('vibe_builder_thumb_styles',array($this,'custom_vibe_builder_thumb_styles')); add_filter('vibe_featured_thumbnail_style',array($this,'custom_vibe_featured_thumbnail_style'),10,3); } // END public function __construct public function activate(){ // ADD Custom Code which you want to run when the plugin is activated } public function deactivate(){ // ADD Custom Code which you want to run when the plugin is de-activated } function custom_vibe_builder_thumb_styles($thumb_array){ $thumb_array['custom_block'] = 'http://xyz/gxrPvvJ.jpg'; return $thumb_array; } function custom_vibe_featured_thumbnail_style($thumbnail_html,$post,$style){ if($style == 'custom_block'){ //Custom block is the same name as added for the thumbnail in pagebuilder $thumbnail_html =''; $thumbnail_html .= ''; $thumbnail_html .= ''; $thumbnail_html .= $post->post_content; $thumbnail_html .= ''; $thumbnail_html .= ''; $thumbnail_html .= 'ID).'" title="'.$post->post_title.'">'.$post->post_title.'demo'; $thumbnail_html .= ''; } return $thumbnail_html; } // ADD custom Code in clas } // END class WPLMS_Customizer_Class } // END if(!class_exists('WPLMS_Customizer_Class')) ?>
    #130865
    Anshuman Sahu
    Keymaster
    Well I checked your code and its working actually . refer: http://prntscr.com/gt18ub here is the code which I tested  : https://gist.github.com/alexvibealex/bb4dfad886103fa9095ef161d1f52c3e
    #230836
    Cronioc
    Spectator
    Same kind of issue When I try to create a Custom Featured Block following the tutorials, my new block never appears anywhere, nor Elementor nor the theme options I've lost 6 hours trying again and again and again, can you help me please ?
    #230908
    logan
    Member
    we have already these featured blocks then why are you trying to add more?? refer: http://prntscr.com/pmmq25 if you want to add any special block then we can take that request as a custom feature request at the nominal cost.
    while posting this code, what is the error appearing.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Creating Custom Featured Block style not working’ is closed to new replies.