Bryan Purcell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Image with link code? [client][/client]Why not use the built-in features in the WP Editor? Just Click “Add Media,” Insert your image, select the image, click the little link icon in the editor, and enter your desired link destination?
Forum: Fixing WordPress
In reply to: Default Option for Attachement Display Settings@voidindustries great, glad to help!
Forum: Fixing WordPress
In reply to: Default Option for Attachement Display SettingsOK – that’s true – I forgot that functions.php gets overwritten when a theme is replaced. Please create a child theme, and paste the code in a functions.php file that you create in that child theme folder.
Forum: Fixing WordPress
In reply to: Default Option for Attachement Display SettingsHello!
I found this snippet that you can paste into your functions.php
add_action( 'after_setup_theme', 'default_attachment_display_settings' ); /** * Set the Attachment Display Settings "Link To" default to "none" * * This function is attached to the 'after_setup_theme' action hook. */ function default_attachment_display_settings() { update_option( 'image_default_align', 'left' ); update_option( 'image_default_link_type', 'none' ); update_option( 'image_default_size', 'large' ); }
I found this at: https://bavotasan.com/2013/set-default-attachment-display-settings-in-wordpress/
let me know how that works!
Forum: Fixing WordPress
In reply to: Image sizes@esmi – I agree – not in the scope – but it seems like this question is more about the WP API than custom theme support.
add_filter( 'image_size_names_choose', 'my_custom_sizes' ); function my_custom_sizes( $sizes ) { return array_merge( $sizes, array( 'your-custom-size' => __('Your Custom Size Name'), ) ); }
from the codex page https://codex.www.ads-software.com/Function_Reference/add_image_size
should do the trick, so long as
your-custom-size
has been defined in an add_image_size call.Forum: Fixing WordPress
In reply to: Extensively redesigning site – need advice for best practices.Yeah – specifically in the templates avoid hard coding absolute URLS – you’ve got the idea!
Forum: Fixing WordPress
In reply to: Adding text in bottom of the front page?Hi – @esmi is correct – don’t edit theme files directly – use a child theme.
Hard coding text in themes is also a no-no, in my book. It looks like you have another widget area that will work for this purpose. Unfortunately you won’t be able to but it between the two lines without some style mods, but you can put it below the video thumbs. The widget area I’m referring to appears to have a blank text widget in it currently. Is that what you’re seeing on you’re end?
Once we confirm that I can help you get the styles in order.
Forum: Fixing WordPress
In reply to: Help with some HTMLHey there – so I think I found your problem.
input, select, textarea, button:not(.close) {
width: 100%;
height: 50px;
border: solid 1px #dedede;
margin: 15px auto;
padding: 0 20px;
}you need to remove these css rules. This is what’s causing the labels to jump down. You can test this by inspecting the input elements in chrome and unchecking the boxes for all the above rules
Forum: Themes and Templates
In reply to: 1st ever custom theme, but with issues?Can you try this?
load up the new posts admin page (with the editor) and go to view source in the browser. you should be able to search the source for “editor-style.css” and see the one you’re referring to in the tinymce code.
Is that in the source? This will tell us if the add_editor_style command is working, and that WP can find your file.
Forum: Fixing WordPress
In reply to: Add recent post from one category in a widgetRobert – Gotta say that’s pretty strange – You want to use plugins for these types of things to make it easier for you ( or the person your building the site for) to update it later on. Any code you write is a potential liability that could cause problems later on if not maintained. That said, kevin provides a valid option.
Not to belabor this point – but this is really not the best way to do it – php in the widgets opens up an attack vector for bad guys, and opens up the potential to crash your site if there’s a php error in the widget code. It’s also code that’s not in version control, and will be hard to keep track as the site develops, etc, etc.
Good luck!
Forum: Fixing WordPress
In reply to: Add recent post from one category in a widgetHey Robert!
I built out a site with a similar need a little while ago – try out the “Latest Custom Post Type Updates” plugin – it’s a free plugin that should do exactly what you’re look for. You can create an instance of the widget for each of your three items, the configure it for each one. You’ll want to edit the “Advanced Settings” for each of the widgets, and select “Filter By Taxonomy checkbox” Then select Filter By “Categories,” then select your respective category.
Let me know how that goes!
bryan
Forum: Fixing WordPress
In reply to: Extensively redesigning site – need advice for best practices.OK – So if you’ve got everything the way you want it on the subdomain – the best way to move it, in my opinion is the free WP DB Migrate plugin. you install the plugin, and when you’re ready to migrate, you can go to Tools -> Wp DB Migrate. Your old url should be already filled in ( the sub domain) enter your new URL (the main site URL) in the “New Address” Box.
In my experience the value in the “New File Path” never matters, so I just copy the Previous File Path over to that field. Your mileage may vary, so you might want to figure out what this is on the remote server. Keep all the other defaults and hit export. It’ll download a database ready to upload on the site hosted at the main domain. This will find and replace all occurances of the old subdomain URL and replace them with the production URL, including both occurrences in db entries (post_content, post_titles, links, etc) and serialized strings (the way widget prefs are stored)
In general, though, make sure you’re not hardcoding any subdomain links in templates, as this migrate script won’t help you there.
Good luck, and feel free to ask questions!
Bryan
Forum: Themes and Templates
In reply to: 1st ever custom theme, but with issues?Ok, yeah – we’ll get this working! What’s your live site URL?
Forum: Fixing WordPress
In reply to: Could someone help me with this minor piece of code?If you’ve got a lot of theme modifications, maybe installing a custom css plugin might be the way to go instead.
Forum: Fixing WordPress
In reply to: Could someone help me with this minor piece of code?Hmmm – actually – not totally sure about this ?? Do you have a staging environment where you can try this out? I’d say in general it’s better to make any major changes like this in a staging environment.