PinkishHue
Forum Replies Created
-
Forum: Themes and Templates
In reply to: page pagent shows grid of all child pagesI needed this same feature a few days ago and found this code that did the job (in a custom page template):
<!-- list subpages --> <?php $args = array( 'orderby' => 'menu_order', 'order' => 'ASC', 'post_parent' => $post->ID, 'post_type' => 'page', 'post_status' => 'publish', 'numberposts' => 15 ); $postslist = get_posts($args); foreach ($postslist as $post) : setup_postdata($post); ?> <div class="asubpage"> <div class="subpageThumbArea"> <?php if ( has_post_thumbnail()) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_post_thumbnail('thumbnail', array('class' => 'alignleft')); ?></a> <?php endif; ?> </div> <h2><a href="<?php the_permalink();?>"><?php the_title();?></a></h2> </div> <!-- subPage --> <?php endforeach; ?> <?php wp_reset_query(); ?>
Hope that helps.
Forum: Themes and Templates
In reply to: How to Add icon to a specific category postsThis tutorial should help you: https://wpninjas.com/easily-add-text-to-post-title-based-on-category/
Just change the appended text to an image URL –
function my_modify_title( $title, $id ) { if( in_category( '*your category name*', $id ) ) { $title = '<img src="*YOUR IMAGE URL HERE*" alt="" /> ' . $title; } return $title; }
You can make a little plugin of this so it will work even if you change your theme: https://codex.www.ads-software.com/Writing_a_Plugin
There might be a better way but that’s the first suggestion I’ve come across.
Good luck!
Thank you Abel, it probably was to do with flushing the permalinks, I wasn’t aware of that issue when testing your plugin.
Either that or a conflict with another plugin.
No worries, thank you for your response. I will mark this as resolved ??
Forum: Themes and Templates
In reply to: Making author name appear in postsSorry for delayed reply.
You want to open content.php
(*important – see note below re: child themes)Around line 38, find this:
<div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
and under that, add this:
<?php if ( is_single() ) : ?> <p>This post was written by <?php the_author(); ?></p> <?php endif; // is_single() ?>
—————
* (you really should use a child theme if you’re not. To do that simply add a new folder called mychildtheme (or whatever you prefer) in your themes folder at: yourwebsite.com/wp-content/themes
Add a style.css file that contains this:
/* Theme Name: My Child Theme Description: Child theme for the Twenty Twelve theme Author: Your name here Author URI: https://example.com/about/ Template: twentytwelve Version: 0.1.0 */ @import url("../twentytwelve/style.css");
then add the edited content.php file in to that folder
(Then activate the child theme in your admin panel)
I ended up hard coding my own form, similar to this tutorial:
https://voodoopress.com/how-to-post-from-your-front-end-with-no-plugin/
You can add whatever custom fields you need then, but it is a bit more complicated than using a plugin.
Forum: Themes and Templates
In reply to: Home PageTo set your page called ‘Home’ to be the home page, in your admin panel go to Settings > Reading
and change the setting. Note you will need to assign another page to display your blog posts so you might need to create another page called Blog or Posts or whatever you like.
Here’s some more info:
https://codex.www.ads-software.com/Creating_a_Static_Front_Page
To remove the ‘Home’ title on your Home page you can either hide it using CSS by adding this to your CSS file:
.page-id-622 .entry-title {
display: none;
}Or you can create a custom page template and remove the bit of code that displays the page title: https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates
(Also, just as a side note, you may want to re-think hiding the header area on your website, it makes things a bit complicated when you have that big header image but not a clickable logo to your homepage, plus you miss out on valuable h1 and h2 tags from the header that tell the search engines what your site is all about.)
Hope that helps!
(Also, another thing I forgot to mention – something is going wrong with your page titles, as in the titles that display across the top of the browser window, they are blank and that’s very bad for SEO, just letting you know in case you hadn’t realised)
Forum: Themes and Templates
In reply to: Making author name appear in postsIn most themes, the author name appears below the post. What theme are you using?
To include it in the page that displays just the post, you need to add some code to the file in your theme that displays single posts, usually single.php or in newer themes something like content-single.php. Here is more information on the code you need to add:
https://codex.www.ads-software.com/Function_Reference/the_author
Something like this: ‘<p>This post was written by <?php the_author(); ?></p>’
If you let us know what theme you are using it will be easier to give advice.
Good luck,
JoAbsolutely agree, this would be a great addition to this plugin ??
I’m hesitant to make edits to plugins as once a site is handed over to a client they might update it in the future and *poof*, the changes are gone!
Could this be used to let the customer add some custom text (or in my case a date from a text field) as a variable? So instead of a dropdown there is a text input?
I’ve been testing for a while but can’t figure it out.
Or is there a way I can just append some text to the title?
Thanks for any help anyone can suggest ??
p.s. Just realised I have kind of asked 2 questions here so I have copied the 2nd part of my question to a separate thread:
Re: appending text to title from form input:
Forum: Plugins
In reply to: [WooCommerce] product date availabilityI’m not sure that plugin will achieve that, if I’m right in thinking the OP is looking for something similar to myself –
I need the store admin to be able to assign dates to a product, e.g. this is available every Monday and Wednesday (it’s for a tour excursion company), and then for the buyer to be able to choose their date from the front end.
It could be done manually by adding the dates as plain text product options but that would be very tedious and just wouldn’t work for a store with more than a few products.
Any advice would be greatly appreciated.
Forum: Plugins
In reply to: [WooCommerce] Using WooCommerce for event / course bookingsThis is just what I need too. I’ve been wracking my brains for about 3 days and very frustrated! I have tried about 20+ different bookings plugins and shopping cart plugins and cannot find a workable solution so that the admin can set dates in the backend (not every day manually, more like this product is available every Monday and Friday) and the buyer can choose their date from the end, preferably with a datepicker but dropdown menu’s or something like that would work too.
If anyone can give any advice I would be SO incredibly grateful!
Thanks in advance to anyone who can help.
Forum: Plugins
In reply to: [Cart66 Lite :: WordPress Ecommerce] booking with calendar statusI need something similar to this.
I was thinking there might be a way to integrate a calendar in to a custom field input, but I’m not sure how to do that or how the admin can set the calendar to show which days are available and which aren’t.
For my needs I require the admin to be able to set the product (an excursion/day trip) to be available for example every Monday and Wednesday and the buyer can pick the date from a calendar.
Is this possible? Any help would be massively appreciated, thank you
Forum: Plugins
In reply to: [WP RSS Multi Importer] Delete FeedsAnother solution would be to run the original feed through Yahoo Pipes and then use the resulting feed (containing just the items related to your terms) on your blog:
https://pipes.yahoo.com/pipes/
Pipes are a little complicated if you’re new to it but there are tutorials that can help you figure out how to filter a feed.
(This won’t remove the existing posts on your blog but will stop any new ones being created that aren’t related to your specific terms)
Forum: Plugins
In reply to: [Doc's Auto-tags] [Plugin: Doc's Auto-tags] Category insted of tagsJust seen that you have updated this to include categories – hurray! Thank you John ?? I will update and test it out over the weekend.
This info should be helpful to you:
QUOTE:
I believe the following should stop thumbnails from being created. If you’re wanting to remove some then and unset the $size[{size}]. Following sizes are there “thumbnail”,”medium”,”large”,”post-thumbnail”.
add_filter(‘intermediate_image_sizes_advanced’,’stop_thumbs’);
function stop_thumbs($sizes){
return array();
}or this plugin: https://www.ads-software.com/extend/plugins/additional-image-sizes-zui/