Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1320516

    wp_5
    Participant

    Hi,

    This question was raised already in 2015, and there is no information on outcome in the related thread:

    Missing Revolution Slider option in "Edit Posts" to select "slide templates"?

    Revolution slider allows to set up template for post-based sliders, and then if you have multiple posts, you can chose in the edit post menu, which template to use. It is described here in this tutorial video, see @13:50.
    https://www.themepunch.com/revslider-doc/post-based-slider/

    This option doesn’t show up in the version from X theme. Why is that? Can you please activate?

    #1320523

    wp_5
    Participant

    Actually, I found another post in this forum: https://community.theme.co/forums/topic/missing-revolution-slider-option-in-edit-posts-to-select-slide-templates-2/

    It is possible to manually activate this by having this code in the functions.php

    function check_re_slider_plugin() {
    	if(is_plugin_active('revslider/revslider.php')) {
        	if(class_exists('RevSliderAdmin')) {
            	RevSliderAdmin::addMetaBox("Revolution Slider Options",'',array("RevSliderAdmin","customPostFieldsOutput"),$postTypes);
        	}
    	}
    }
    add_action( 'admin_init', 'check_re_slider_plugin' );

    However, I still think this should be activated by default. Can you please change this?

    #1320832

    Christopher
    Moderator

    Hi there,

    This option is only available for artcile pages. If you want to add slider to posts pages, add following code in child theme’s functions.php file :

    // Adding a Slider to post pages
    // =============================================================================
    
    add_action('x_before_view_ethos__landmark-header', 'welcome_message');
    
    function welcome_message() {
      if ( is_singular('post') ) {
        echo do_shortcode('[rev_slider alias="slider_alias"]');
      }
    }

    Hope it helps.

    #1320989

    wp_5
    Participant

    Hi Christopher,

    I am not sure whether this code snippet is the solution to the question.

    What I am looking for is, that in the WP admin area, under editing a post the following section displays (see attached image). It allows to select a slide template if the currently edited content is being used within a post-based slider.

    I think your code snippet only displays a slider with a specific alias for Ethos themes, when the content type is post (on the frontend).

    #1320998

    Christopher
    Moderator

    Hey there,

    Thanks for writing in!

    As I mentioned in previous replay, this option is not available for posts. With provided code you could display one single slider on all posts pages.

    Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #1321040

    wp_5
    Participant

    Hi Christopher,

    I think you might have misunderstood my request. I do not want to show a slider on all posts pages.

    What I want is to create is a post-based slider with multiple templates, i.e. a slider which automatically displays a number of posts in a slider (each post is one slide). This is a standard feature of Revolution Slider. Please see this video, where Theme Punch explains it. You find the template selection part @13min:50sec.
    https://www.themepunch.com/revslider-doc/post-based-slider/

    While the Revolution Slider plugin itself offers a functionality to chose which template for each post is being used within the slider, the X theme prevents (for an unknown reason), that the option to select the slide template is dsiplayed under editing a post (or a page).

    The above code snippet (see my 2nd post: https://community.theme.co/forums/topic/slider-revolution-template-selection-missing/#post-1320523) brings it back, but I do not see any reason why this is not displayed by default.

    You can find the code of revolution slider to display the meta box for choosing the slide template under
    /wp-content/plugins/revslider/admin @line 589-593

    	/**
    	 *
    	 * add wildcards metabox variables to posts
    	 */
    	private function addSliderMetaBox($postTypes = null){ //null = all, post = only posts
    		try{
    			self::addMetaBox("Revolution Slider Options",'',array("RevSliderAdmin","customPostFieldsOutput"),$postTypes);
    		}catch(Exception $e){}
    	}

    The X specific meta boxes are under
    /wp-content/themes/x/framework/functions/global/admin/meta
    – but I couldn’t find out yet, which piece of code prevents the Revolution Slider’s function from displaying the meta box.

    Therefore my request would be that your developers take a look into that, why the display of the meta box is suppressed by X, and try to bring it back by default.

    Thanks.

    #1321375

    Rad
    Moderator

    Hi there,

    X theme and Revslider has no internal integrations other than enabling X theme to display the Revslider. The meta you’re referring from X theme is different one, and it’s not related to Revslider. The post meta, seo meta, and custom field meta, there are many types of meta.

    The new version of Revslider doesn’t use post templates anymore, selecting Content Source as Post-Based is enough. Then displaying custom post meta by adding {{meta:custom_field_name_here}} within text layer is how you’ll display added custom fields on your post. Of course, you’ll need to change custom_field_name_here to match your custom field name.

    Slide templates from from Revlsider v4 which is not applicable for v5.

    Thanks.

    #1321472

    wp_5
    Participant

    Hi Rad,

    I am sorry, but you also did not get the problem. When I refer to “templates”, I mean that I can create multiple slides in a post based slider, which are different from a layout perspective. Then with this meta box, I can chose which one to use in the slider. Please watch the tutorial video.

    To summarize:

    • I have installed Slider Revolution v5.3.1.5 which comes with X.
    • I have set up a post bases slider with two templates as described in the video, which I linked 2 times here
    • By default the meta box displayed on the screenshot which I did upload is not shown under edit posts. screenshot In the Themepunch video and on Rev Slider documentation they say it should be there.
    • When I add above posted code to functions.php, then I can see this box when I edit a post (https://community.theme.co/forums/topic/slider-revolution-template-selection-missing/#post-1320523)
    • When I make a template selection (one of the two template slides of the post based slider) and save the post, then it works, i.e. the slider uses the respective template for that post.

    So, it seems that all works as documented by Theme Punch. The only thing, that is not working is that this meta box is not displayed when having slider revolution from the X theme activated. I would really recommend that you follow this video tutorial and that you try the code which I provided for the functions.php – so that you can understand the issue.

    Previous posts in this forum confirm the problem:

    Missing Revolution Slider option in "Edit Posts" to select "slide templates"?

    Missing Revolution Slider option in "Edit Posts" to select "slide templates"?

    #1321843

    Rad
    Moderator

    Hi there,

    Ah, sorry for the confusion. This one should work

    add_action('init', 'init_rev');
    
    function init_rev() {
        if(class_exists('RevSliderAdmin')){
            RevSliderAdmin::addMetaBox("Revolution Slider Options",'',array("RevSliderAdmin","customPostFieldsOutput"), array('post', 'x-portfolio', 'page') );
        }
    }
    

    Please add that code to your child theme’s functions.php, then go to Screen Options on top of the post you’re currently editing and make sure Revolution Slider Options is toggled on. Then scroll down and find Revolution Slider Options meta box.

    I’m not really sure why this feature is turned off, I tried finding any admin options to enable this. It’s either a bug, or intentionally disabled by the plugin author.

    I’ll forward this for further checking.

    Thanks!