Jump to content

Recommended Posts

I don't know much about PHP but have this code I am trying to get to work in my Thesis Wordpress theme.  I get an error on line 69 just a few lines from the bottom, which reads;

 

<?php } } ?>

 

 

Here is the entire code.  Any help to resolve this issue would be great.  I am guessing it is something basic;

 

// Delete this line, including the dashes to the left, and add your hooks in its place.

 

/**

* function custom_bookmark_links() - outputs an HTML list of bookmarking links

* NOTE: This only works when called from inside the WordPress loop!

* SECOND NOTE: This is really just a sample function to show you how to use custom functions!

*

* @since 1.0

* @global object $post

*/

 

function custom_bookmark_links() {

global $post;

?>

<ul class="bookmark_links">

<li><a rel="nofollow" href="http://delicious.com/save?url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url=<?php urlencode(the_permalink()); ?>&title=<?php urlencode(the_title()); ?>', 'delicious', 'toolbar=no,width=550,height=550'); return false;" title="Bookmark this post on del.icio.us">Bookmark this article on Delicious</a></li>

</ul>

 

 

   

 

 

 

// This is the code generated by Rick Anderson for the BYOBWebsite.com "Ask the Architect" Tutorials

// This code works in Thesis 1.6

// The code is designed to create a custom template that displays posts that are scheduled to be

// displayed in the future.  These posts must be in a specific category.

// Definitions:

//    unpublished-future-events is the name of the page that uses this custom template

//    upcoming-events is the name of the category of posts to be displayed

// add_action('thesis_hook_before_sidebar_1', 'thesis_widget_recent_posts');

 

// There is a video tutorial on my blog that demonstrates the use of this - www.byobwebsite.com

 

 

function custom_template_01() {

if (is_page ('local-events')) { ?>

 

<div id="content">

 

<?php thesis_page_loop(); ?>

 

// <!--CUSTOM QUERY CODE START-->

<?php $temp_query = $wp_query; ?>

//      <!--find all posts of this category that are unpublished and sort them ascending by date-->

<?php query_posts('category_name=upcoming-local-events&order=ASC&post_status=future'); ?>

 

<?php while (have_posts()) : the_post(); ?>

 

  <div class="post_box" id="post-<?php the_ID(); ?>">

    <h2 class="headline_area"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    <?php the_excerpt(); ?>

  </div>

<?php endwhile; ?>

// <!--CUSTOM QUERY CODE END-->

 

</div>

<div id="sidebars">

<?php thesis_build_sidebars(); ?>

</div>       

 

<?php } } ?>

 

// <!--Now unhook the sample custom template and hook our custom funtion in it's place-->

 

remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');

add_action('thesis_hook_custom_template', 'custom_template_01');

Link to comment
https://forums.phpfreaks.com/topic/200317-simple-php-error-with-wordpress-code/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.