Big Bagel
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: All the text on my blog has shrunk and Ive no idea whyWere you editing your theme’s CSS or options when it occurred? Maybe you just accidentally zoomed out a bit in your browser without realizing it. Pop open your site in a different browser to double check.
If you want to provide a link, I/someone can at least tell you how large your text currently appears to others.
Forum: Fixing WordPress
In reply to: Twenty Eleven theme Change "Home" to "blog"The easiest way is to create a custom menu through “Appearance > Menus”.
Forum: Fixing WordPress
In reply to: Add metabox to the plugin settings pageFor consistency and future-proofing it might be best to stick with the normal styling provided by the Settings API. However, if you really want to add meta boxes, I do know that
add_meta_box()
just adds a meta box to a queue which is then output by thedo_meta_boxes()
function.Function Reference/do meta boxes
This reference is a bit old, but may offer a few useful insights/examples:
Forum: Themes and Templates
In reply to: Need basic php help with if/elseifWhoops! My bad. I blame all my failings on Google. :p
Forum: Themes and Templates
In reply to: Need basic php help with if/elseifWordPress doesn’t have an
in_category()
function. Unless it’s a custom function, you’re probably wantingis_category()
:Forum: Fixing WordPress
In reply to: Remove unwanted scripts from the headerremove_action( 'wp_head', 'rsd_link' );
works just fine. Make sure you’re adding it in the proper place and that you aren’t seeing a cached version of your site.Just to add a couple references for any future visitors:
Forum: Hacks
In reply to: Add class to post titles.Your post headers look like they already have the class
header-wrap
. You could use that. If you want to add an additional “scroll” class it would look like this:<h2 class="header-wrap scroll">
Forum: Fixing WordPress
In reply to: Add Links on Navigation BarIf your theme supports it, you can completely customize your nav bar through (Appearance > Menus).
Without knowing the theme in question (a link to site would fix that) it’s impossible to give a more definitive answer.
Forum: Fixing WordPress
In reply to: transfer a modified theme to updated version of wpAn update to WordPress itself will not touch your theme in any way. If/when the theme you’re using has an update, then you might have a problem. To prevent losing modifications in the event of a theme update, you can look into child themes. As with any core update, making a backup of your files and database beforehand is always a good idea.
Forum: Hacks
In reply to: shortcode_atts defaults are not workingYes, there should be a notice.
$atts
is whatever parameters the user provides. When this shortcode is used, only$atts['id']
exists:[media id=81]
The function
shotcode_atts()
then takes that array and merges it with the defaults you provide, returning the result. If you used:$merged = shortcode_atts( array( 'id' => '', 'size' => '1/2', 'group' => '', 'showtitle' => true, 'showicon' => true, 'showbody' => true, 'icon' => ''), $atts );
Then
$merged
would be an array of all the proper values and$atts
would still only be an array of whatever the user provided. Your new code in effect merges the given and default parameters then overwrites the$atts
array with the new array. Usingextract()
, like you did before, automatically creates a variable that can be immediately used for each key in the returned array ($id, $size, $group, etc.
).Some good shortcode references:
Shortcode API
https://planetozh.com/blog/2008/03/wordpress-25-shortcodes-api-overview/
https://aaron.jorb.in/blog/2010/02/wordpress-shortcodes-a-how-to-by-example/#.TwyTGG9SQsI
https://wp.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/
https://wp.tutsplus.com/tutorials/getting-started-with-wordpress-shortcodes/Forum: Hacks
In reply to: shortcode_atts defaults are not workingshortcode_atts()
combines any user provided parameters ($atts
) with the array of defaults you provide and returns the merged array.Function Reference/shortcode atts
In your example above
$atts['size']
doesn’t exist and thus results in an undefined index notice. You want to either store the returned array in a variable or (like you are currently doing) use PHP’s extract function to create individual variables from each element in the array. After usingextract()
,$size
,$id
, and$group
exist and are already set to the proper values.Edit:
Just a minor side note, there’s an errant comma in your code. Should be:'group' => ''
Forum: Fixing WordPress
In reply to: login_footer in wp-login.phphome_url
points to the main front-facing page of the installed WordPress blog. The link in question is intended to return any errant visitors to just that page. I fail to see the problem with “Return to Example” linking toexample.com
.For example, if I install WordPress into its own directory (example.com/wordpress) but then set it up so that the actual WordPress site is displayed at the root (example.com) then
home_url
will point to the properexample.com
whilesite_url
would point to the publicly non-existentexample.com/wordpress
.Forum: Themes and Templates
In reply to: Theme errorUse an FTP client or file browser provided by your host to access the problem file.
Then either completely replace it with a fresh, unaltered copy or fix the syntax error on line 126.
Forum: Fixing WordPress
In reply to: login_footer in wp-login.phpGenerally,
home_url
is where the site exists (the site’s home page), whilesite_url
is where the actual WordPress installation exists. Usually they’re the same. Since this is for a link to the site’s home page,home_url
is the proper template tag.Forum: Themes and Templates
In reply to: Cant upload zip file themesIf you’re having problems with the built-in uploader, you can always install a theme manually with an FTP client or a file browser offered by your host. Links that might help to manually install a theme:
https://codex.www.ads-software.com/Using_Themes#Adding_New_Themes
https://www.youtube.com/watch?v=GLYwQN0iI5gSince you have a premium theme, you should be able to get theme specific support from the developers/sellers.