alexduff
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to show tags like categories in the new post SCREEN?I would LOVE to get some code to do this, too!!!
There is a plugin which can do this:
https://www.ads-software.com/extend/plugins/manage-tags-capability/
but I’d much prefer to somehow automate this through the theme.
Forum: Fixing WordPress
In reply to: Duplicate Tags being cretedCheers, s_ha_dum. It is certainly strange. I’ll keep on plugging away!! ?? If I solve this, or anyone else has came across this before, I’ll update this thread.
Forum: Fixing WordPress
In reply to: Needing to show archived posts from multiple monthskeesiemeijer – sincere thanks for this!!!! You’ve helped direct me to a perfect solution which I will enter below in case anyone else might be trying to do this too.
Firstly, we need this function defined early on in the template:
function filter_where( $where = '' ) { // posts for January 2009 to July 10th, 2012 $where .= " AND post_date >= '2009-01-01' AND post_date < '2012-07-10'"; return $where; }
Then this code can be used to extract posts inside the timeframe set in the function above:
<?php global $post; add_filter( 'posts_where', 'filter_where' ); $the_query = new WP_Query( array('tag' => 'mathtag', 'numberposts' => 3 )); $postsByTag = get_posts('tag=mathtag&numberposts=3'); while ( $the_query->have_posts() ) : $the_query->the_post(); echo '<a href="'. get_permalink().'">*</a> ['; echo the_time('d/m/y').'] '.get_the_excerpt().'</a><br />'; endwhile;?> <?php remove_filter( 'posts_where', 'filter_where' );?>
Forum: Fixing WordPress
In reply to: Display posts using custom taxonomy tagskeesiemeijer – can’t thank you enough!!!!!! Works perfectly – really appreciate this!!!
Easier than I thought – I had to edit the ’50’ which appeared in 2 of the php files 4 times each to 70 (in my case) to resolve this. Cheers!!
Forum: Fixing WordPress
In reply to: Trying to embed a static front page into a themeThey’d still have to actually add those pages though
Thanks, Jeezyo, but I don’t want the pupils to have to do anything. One option I’m considering (but not liking) is to add an initial post which graphically shows the steps required to add the static pages.
Would LOVE to get any other thoughts on this!!
Forum: Fixing WordPress
In reply to: Trying to embed a static front page into a themeAnyone got any thoughts on this? Would really appreciate some ideas to help me dig in to this a little deeper.
Forum: Fixing WordPress
In reply to: How do you know if WordPress is working on your blog site?To see the source code, go to View -> Source
Forum: Fixing WordPress
In reply to: Linking to PagesThe solution was far easier than I ever expected!!! Even with the code
[Code moderated as per the Forum Rules. Please use the pastebin]
which does what I was after, the excluded pages appear as links in the sidebar abovr the Pages links as Subpages links – real bonus!!
Forum: Fixing WordPress
In reply to: Linking to PagesThanks, Conv.
Yes – they do appear in the dashboard, and I could edit them there; however, I really don’t want to do that – the theme is for pupils, and I want a solution out of the box with zero customisations required from them.
I think what I might do is create a second version of sidebar.php and create a new template refering to the new sidebar. This new version would contain the links to the pages. This might work.
Thanks for your suggestions – very much appreciated.
If I get this working, I’ll post the solution up here; of course in the interim if anyone else has any other suggestions, I’m all ears!! ??
Forum: Fixing WordPress
In reply to: Linking to PagesYou are correct, conv – I’ve not used the backend to create the pages. They’re created on the fly when the theme gets selected. This is how I’ve created the pages inside functions.php:
[Code moderated as per the Forum Rules. Please use the pastebin]
Forum: Fixing WordPress
In reply to: Linking to PagesThanks, duck__boy.
The problem with that though is that the pages are set to have an ID, eg page_id=14
These IDs of course could vary from one install to another; therefore I cannot simply use a link such as that.
I’d love to use a static link using the slug, but don’t know if it’s possible to code in a change from using IDs to slugs for the URLs – is that what you’re hinting at, and if so, do you know how that could be done?