We're merging with GenerateBlocks! Learn more here.

[Resolved] Add custom option in WPSP backend

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Add custom option in WPSP backend

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #13814

    Hi Tom,

    This might be a long shot but here goes.
    Below a snippet that adds some custom code after the meta.
    I have created a custom field that should show a checkbox to add or not add the custom code.
    On this forum I have seen snippets to use/add custom fields but I’m not sure how to combine them with the my snippet.

    Is it possible to add a custom checkbox to the WPSP meta section in the backend?

    add_action( 'after_setup_theme','tu_move_post_meta' );
    function tu_move_post_meta() {
        add_action( 'wpsp_after_title','wpsp_add_custom_meta' );
    function wpsp_add_custom_meta() {
        echo '<ul class="reads-shares-meta">
    	                 <li class="post-reads-info">' . do_shortcode('[post-views]') . '</li>
                         <li class="post-shares-info">' . do_shortcode('[social_warfare buttons="totals"]') . '</li>

    Hi there,

    It’s not possible to extend the options in the plugin at this time.

    However, you can target specific lists inside the hook:

    add_action( 'wpsp_after_title', function( $settings ) {
        if ( '123' == $settings['list_id'] ) {
            // Your code in here.
    } );

    You just need to update 123 with the ID of your list.


    Hi Tom,

    That clears things up.
    Thanks for advising a different approach.


    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.