Loop through posts of a custom-post-type (event) and create .ics (iCal) file?

I really need your help with a feature I have never worked with so far. I have a custom-post-type named wr_event. And I created this custom WP_Query to retrieve all posts for this post-type that are “younger” than yesterday. Fairly simple and this works like a charm. function event_list_iCal() { $yesterday = time() – 24*60*60; … Read more

Display trackbacks separately from comments in twentyeleven

How do I display trackbacks (the link and the date) outside of the twentyeleven comment loop? The function below is from the twentyeleven functions.php file. I’m using the standard comments.php file from twentyeleven, and the trackbacks are shown under the comments when using <?php comments_template( ”, true ); ?> in a template file. I can … Read more

How to get new post URL?

I’m wondering… how can I get the new post URL in my theme? Is there a built-in function for this? So, it should return something like http://example.com/wp-admin/post-new.php?post_type=post. Connor. 1 Answer 1 admin_url(‘post-new.php’); The admin_url function will handle generating most of the link, you just need to give it the final component. You can pass in … Read more

How to change featured content to a different tag in WordPress Twenty Fourteen?

In twenty fourteen theme, we’d like to know how to change the features content tag. Currently it’s set as featured. Now, we would like to know how to code this for different page templates. We notice in page.php there is a piece of code calling the template part featured-content. <?php if ( is_front_page() && twentyfourteen_has_featured_posts() … Read more

jquery won’t load in footer

I wanted to move jquery to the site’s footer, but that doesn’t work. I’ve tried it with the following code. As you can see, I have a couple of another scripts and they load correctly on the footer. Only jquery won’t work. //This adds our JavaScript Files function wel_adding_scripts() { wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js’, ”, ‘2.1.1’, … Read more

Ajax call theme functions from front

Here’s what I try to do : calling a function in my theme functions.php from the front of my theme. So, on the front : $(document).on(‘click’,’.btn-vote’,function(e){ e.preventDefault(); var $that = jQuery(this); var id = $that.attr(‘data-id’); var data = { ‘action’: ‘voteIncrementer’, ‘id’: id }; jQuery.post(ajaxurl, data,function(response){ // ajaxurl is defined in footer.php > var ajaxurl=”<?php … Read more

Nested shortCode functions in the functions.php file

I’m trying to get a shortcode function (newStuff) to display inside of another function (oldStuff), but I’m running into trouble. Both shortCode functions are listed below, as well as what I’ve tried. Can someone please help me get the “newStuff” function displaying inside of the “oldStuff” function? Thanks! Current Functions function newStuff(){ return ‘ only … Read more