WordPress.org

Forums

Standout CSS3 Buttons
[resolved] Are these css3 buttons responsive? (5 posts)

  1. befree22
    Member
    Posted 1 year ago #

    I have 2 image buttons displaying on http://pastebin.com/hNGc7HeN but I want to replace them with css3 buttons instead.

    1. What is the php function call code for the 2 buttons I need? It's not listed in the settings. I saw some php in http://www.jimmyscode.com/wordpress/standout-css3-buttons/ but I'd like to know what php function call I need to add so that the buttons display in the header.

    2. I'd like to know if I can display buttons side by side in the header.

    3. I'd like to know if the buttons are responsive.

    Or would I need code shared on http://stackoverflow.com/questions/20902400/how-to-make-custom-css-button-responsive to make the buttons responsive?

    Awaiting a reply

    https://wordpress.org/plugins/standout-css3-buttons/

  2. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    1. To call the button in your PHP code, you need two things: an action hook, and the call to the button function. There is an example in the documentation:

    add_action('the_content', 'show_css3_button');
    function show_css3_button($content) {
      if (is_page('home')) { // we are on a page with slug 'home'
        if (function_exists('scss3button')) { // plugin is installed/active
          $content .= scss3button(array('cssclass' => 'scss3b-button-rss',
    'href' => 'http://www.google.com/'),
    'Click here');
        }
      }
      return $content;
    }

    The hook will change depending on where and when you want to display the button. Also, the code will change slightly depending on the hook. When you hook 'the_content', you have to pass in the_content as a parameter and return it. Other times, you may simply echo the button.

    2. You can, the demo page that you linked to shows this behavior.

    3. The buttons are not responsive. Let me see what I can do.

  3. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    I made some adjustments and the buttons should be responsive. Look for a CSS update in the next version.

  4. befree22
    Member
    Posted 1 year ago #

    I appreciate your willingness to keep up with technology and make the plugin responsive. Some plugin authors don't even bother to reply or maintain their plugins.

    1. Will the php function call code be added to the update?
    2. Will I can display buttons side by side in the header?

    Awaiting a reply

  5. jp2112
    Member
    Plugin Author

    Posted 1 year ago #

    1. The plugin has always had the ability to be called from PHP. Check out the FAQ for sample code. Also, the plugin settings page has sample PHP code on it, on the Parameters tab.

    2. Yes, you can see it on my demo page (check the FAQ for link).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Standout CSS3 Buttons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic