DaveE
Forum Replies Created
-
Forum: Plugins
In reply to: [Flexible Posts Widget] Adding HTML within widget titleYes, you’d need to setup the custom HTML template so that it will dynamically create the link based on the term chosen by the widget instance. You can get the chosen term in your template by using the variable
$term
in the template (it’s already setup by the widget beforehand).This codex doc should help: https://codex.www.ads-software.com/Function_Reference/get_term_link
Cool. Glad to know that it wasn’t me and that you’ve already got a fix in the works. I appreciate the help!
Forum: Plugins
In reply to: [Flexible Posts Widget] Adding HTML within widget titleHi duncmorley,
This would best be done within a custom HTML template. Flexible Posts Widget supports creating your own templates for displaying the posts widget. Instructions for getting started with the custom templates are here: https://www.ads-software.com/extend/plugins/flexible-posts-widget/installation/.
Once you’ve got your own template running, you’ll want to concentrate on editing line 13, where the code is:
echo $before_title . $title . $after_title;
. You should be able to wrap the title in a link by adding your link HTML around the$title
inside of the before & after variables.Hopefully that helps!
Hi Jonah,
Thanks for getting back to me. I am able to reproduce this issue on a plain-jane installation of WordPress 3.4.2 and The Events Calendar 2.0.10. Simply put, just add the following action to your theme’s function.php file and notice that any upcoming events will stop showing up on the site. (Unless, of course, your event posts happen to have a
meta_key
called ‘test-query’):function test_query( $query ) { if( is_home() && $query->is_main_query() ) { $query->set( 'meta_key', 'test-query' ); $query->set( 'orderby', 'meta_value_num' ); $query->set( 'order', 'ASC' ); } } add_action( 'pre_get_posts', 'test_query' );
For what it’s worth, I use the debug bar and just debugging the value for
is_home()
right inside this function (before the if check) will output ‘true’. Hopefully that will get you started in the right direction. If you’d like, I can get you access to my test-case for the issue. It’s a one-click install of WordPress via Dreamhost, so nothing fancy or wonky with the hosting or WP instance.Cheers!
Forum: Plugins
In reply to: [Plugin: Flexible Posts Widget] Make widget title a linkHello, duncmorely,
This is a standard limitation in the way WordPress handles Widget titles. It’s not specific to FPW. However, since you can create your own widget template files (custom HTML output); you can certainly add the link information you need within the template itself.
I hope that helps,
DaveE
I was able to setup my own work around. Basically, I added an additional conditional check to skip my query modification if the query post_type is set to
tribe_events
.See this pastebin for details: https://pastebin.com/QevCp6T9
It’d still be nice to understand why TEC sets the is_home() condition for event listing views.
Cheers!
Forum: Plugins
In reply to: [Flexible Posts Widget] Remove bulletsHi Sildona,
The bullets are because the plugin uses an unordered list [
<ul>
] to list out the entries by default. Styling the list to remove the bullets or changing the HTML to another type of tag would be the best methods for removing the bullets.You might try adding the following to your theme’s styles.css:
.dpe-flexible-posts {list-style:none;}
The plugin is intentionally designed to no include any of it’s own styling to allow developers and designers the ability to customize it however they’d like to match their themes.
Forum: Plugins
In reply to: [Instagram for WordPress] Loggin errorTake a look at my response here for a probable cause and solution: https://www.ads-software.com/support/topic/plugin-instagram-for-wordpress-log-in-does-nothing?replies=7#post-3317976
Hi all,
I spent some time debugging this today and found that the API access (client_id and secret key) that the developer is using has started hitting Instagram’s API authentication limit. The actual message returned from the API was “XAuth rate limit exceeded”.
Basically, the plugin has become popular enough that there are too many people trying to authenticate their Instagram credentials with the developer’s API Client_ID.
The simplest fix (all though certainly not the best as it requires hacking the plugin directly) is to get your own Instagram API credentials and replace the developer’s with your own.
You can do this by first getting a developer account and then registering a new application here: https://instagram.com/developer/.
After that, replace theclient_id
andclient_secret
keys around line 194 ofwpinstagram.php
in the plugin’s code.Again, this is a less-than-ideal solution, but or those of us in a hurry to get the login working again, this should do it.
@jbenders, Maybe its worth adding a settings page to the plugin where you can help user get and enter their own API keys? Just thinking aloud about a long-term fix. I love the plugin. If you’re interested, you can see how I used it over here: https://canalparkbrewery.com/
Cheers!
Forum: Plugins
In reply to: [Flexible Posts Widget] Post Title too big, how can I resize ?Hi Naudi,
Flexible Posts Widget doesn’t do any styling. Rather, it works with the existing styles already setup by your theme. If the titles are too big and not spaced the way you’d like, you’d best be served by editing your theme’s stylesheet. You may try the WordPress Codex article called Styling Lists with CSS as it provides a good introduction as to how to style your sidebar/widgets.
Beyond that you might try using a theme with widget styles more inline with what you’re looking for.
Hopefully that helps,
Hi Nick,
I’m sorry we weren’t able to get this to work together. Let me know if I can be of further assistance debugging it. For now, I’m going to consider this thread closed.
Ah, I think I understand. The widget outputs code with the H4 tags wrapped inside the A tag. If you apply a
display:block;
to the a tag, it should properly “box” the H4 and thus appear on the same line as the bullet. Styles for this might look like:.widget_dpe_fp_widget a {display:block;}
Alternatively, you could switch out the order of the widget output so that the A tag is within the H4 tag.
Helpfully that helps,
Hi Carsten,
Well, that’ll make a guy feel a bit foolish. Thank you for pointing that out. I’ve updated the plugin with a correct source order for the if/else and the before/after widget.
Cheers!
Hi dmorrisse,
You’ll have to provide more context to your question that this. Do you have a website where I can view the issue? Really, Any CSS issues should be posted to a different forum, since this plugin doesn’t handle any CSS styling. Let me know if you can provide more context and we’ll go from there. Thanks.
You’ll still need the foreach loop from your original example. Here’s the whole code block together: https://pastebin.com/mvS0QXA4. Cheers!