TheDoc
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Add Boarder to JUST Featured ImageA class is not the same as a category.
Your class name can be anything. You are making up whatever class name you want to use for these images. If ‘featured’ sounds like a good class name, then go ahead and use it.
This needs to go in your template file where you are calling the image:
<?php the_post_thumbnail('thumbnail', array('class' => 'featured')); ?>
…and this needs to go in your style.css:
img.featured { border: 3px solid black; }
Forum: Themes and Templates
In reply to: Add Boarder to JUST Featured ImageExactly – you just need to create a class name that you want to use.
Forum: Plugins
In reply to: [Cleaner Gallery] Cleaner Gallery – Linked File (URL) issue?This says resolved but I’m still encountering the problem – any help?
For now, I have used this: https://oikos.org.uk/2011/09/tech-notes-using-resized-images-in-wordpress-galleries-and-lightboxes/
Forum: Themes and Templates
In reply to: Add Boarder to JUST Featured ImageYou could add a specific class to your post_thumbnail in your template like this:
<?php the_post_thumbnail('thumbnail', array('class' => 'yourclassname')); ?>
So you could do something like:
img.yourclassname { border: 3px solid black; }
And quickly sorted… Again, same issue. JS was calling something different than what was being outputted by the tribe_month_year_dropdowns() function. Needed to remove “tribe-events” from the other ids / classes.
Found out why it wasn’t firing. The HTML being created is using a different class than what the script was calling. HTML was outputting this class “events-dropdown” and the first line of the function looked like this:
$(".tribe-events-events-dropdown").live('change', function() {
Now I’m getting the 404 error because it is changing the URL to:
mysite.com/event-calendar/undefined-undefined
More digging required…
Well, a lot of hair pulling occurred here (absolute amateur when it comes to this stuff), but I’ve got a solution that works for me.
I’ve got it set up so that my Custom Taxonomies only show on pages that are a descendant of a certain ancestor.
// Remove taxonomy boxes from certain pages function gg_no_more_tax() { $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; $parent = get_post_ancestors($post_id); if(!in_array('4',$parent)) { remove_meta_box('agegroupdiv','page','normal'); remove_meta_box('venuediv','page','normal'); } } add_action('admin_init','gg_no_more_tax');
A rundown of what’s happening:
- Get id of current page
- Get ancestors of current page
- Check if a certain page is contained in the array (in my case I was looking for a page with the id of 4)
- Remove meta boxes if not in that tree
Hope this helps!
So, I’ve got it to where I can remove it from all pages, now I need to figure out how to adjust the ‘page’ value to only be a certain section of pages. I’m going to assume I’ll need to query the DB but I’m not sure how.
Perhaps I won’t be able to use the remove_meta_box function at all that way, but fingers are crossed.
// Remove taxonomy boxes from certain pages function gg_no_more_tax() { remove_meta_box('agegroupdiv','page','normal'); } add_action('admin_init','gg_no_more_tax');
I would also very much like to do this. I know Advanced Custom Fields lets you specify to only show certain options if parent page equals an id – I wonder if that can be used somehow.
Forum: Themes and Templates
In reply to: Best Approach? CPTs, Taxonomies PluginsYea, I’m using Custom Menus for the main navigation, but I don’t want to have the client have to manage each section’s navigation as well (about 5-6 sections).
The problem, in essence, is that the CPTs are sort of taken out of the regular flow of the site’s page structure.
Thanks for the suggestions.
Forum: Themes and Templates
In reply to: Best Approach? CPTs, Taxonomies PluginsBy ‘problems with the navigation’ I mean… the main dropdown navigation, breadcrumbs and the section navigation that will be in the sidebar.
Forum: Themes and Templates
In reply to: Removing darkgray line under menu (twenty eleven)This is in your CSS file:
#access { border-bottom: 1px solid #222; }
If this is a theme that you’ve downloaded and you want to make sure you are able to update it in the future, create a child theme before you make any changes and then make the changes to the child theme*.
*I’m pretty sure this is best practice, but somebody else correct me if I’m wrong.
Forum: Fixing WordPress
In reply to: Random Posts with Featured ImageI have a feeling you could do something like this:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); if(has_post_thumbnail()) { the_content(); the_post_thumbnail(); } endwhile; ?>
Forum: Fixing WordPress
In reply to: Links to external sites will not workBackticks are
` those.
Note under the message box on the forums here where it says “Allowed markup…”. Right under that it says “Put code in backticks.”
Forum: Fixing WordPress
In reply to: Links to external sites will not workAh, so the link you’ve been trying to put in is this:
<a href="https://www.telegraph.co.uk/news/celebritynews/6602430/Kate-Moss-Nothing-tastes-as-good-as-skinny-feels.html" title="Here"></a>
Just need to use the backticks to make sure the code doesn’t render.
The reason why it’s rendering as blank is because there is nothing actually being linked. Example:
<a href="/">Need to put text in here to link!</a>
So when you add a link with the link button, make sure to highlight some text first!