ethanhackett
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Tiles] [Plugin: Post Tiles] PHP short code for theme?It uses the short code which you place in the page/posts itself. It doesn’t go into the template.php files themselves.
Sorry for the delay. I thought I would receive notifications when someone posted on the forms.
Forum: Hacks
In reply to: How to create radio button in options page?@simivar that helped me a lot. I also would like to append to your code recomendation with an if empty boolean.
If this is the first time the plugin has been installed, the page won’t display a default value. I’d recommended adding a boolean that checks to see if the returned option has a value. If it’s empty then assign it the default value true or false.
Example:
<?php // Retrieves the option using get_option(); and assigns it to a variable. $[VARIABLE] = get_option('[NAME]'); // Checks to see if variable is empty. Ex: not yet defined by the users. if(empty($[VARIABLE])){ // If it is empty assign it your default value true or false. $[VARIABLE] = "[FALSE/TRUE]"; } ?>
This helps from a UX point of view. The users may not know whether something by default is yes or no. Going the extra step will be well worth it.
Same Example No Comments:
<?php $[VARIABLE] = get_option('[NAME]'); if(empty($[VARIABLE])){ $[VARIABLE] = "[FALSE/TRUE]"; } ?>
I have it running in the footer of https://www.tincrate.com I modified the plugin and ended up using unordered lists instead of tables. You can fork it on github if you want an alternate ul version with some styling.
I had trouble at first until I realized the rss url needs the https://pinterest… not feed://pinterest…
That resolved it not loading content but I agree with Spunkster it looks terrible!
Forum: Themes and Templates
In reply to: Why doesn't register_default_backgrounds exist?I agree I think this is a common enough desire that it should be in the core. However I ended up editing the functions.php in my theme and added some custom fields and used a radio button to choose the image.
here’s the tutorial that I followed then modified.