Custom Post Widget
[resolved] content block image / link not working on custom page (4 posts)

  1. developdesign
    Posted 4 years ago #

    Both this and smart blocks aren't working on custom wordpress pages. Also doesn't work on default twentyten category.php page.

    I tested the problem using both a child theme and the default twentyten theme. On twentyten, the default index.php ( home page ) displayed the smart code, but the default category page ( news, properties ) didn't work on both themes.

    How do I check if a query is closed or not ( other than manually scanning code ). I'm using BBEdit. Could you possibly check the code on the two pages and see if you any issues?

    Can you also suggest any web site where I should post this question?

    Here's the categories.php page:

    ` <?php
    * The template for displaying Category Archive pages.
    * @package WordPress
    * @subpackage Twenty_Ten
    * @since Twenty Ten 1.0

    get_header(); ?>

    <div id="container">
    <div id="content" role="main">

    <h1 class="page-title"><?php
    printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    $category_description = category_description();
    if ( ! empty( $category_description ) )
    echo '<div class="archive-meta">' . $category_description . '</div>';

    /* Run the loop for the category page to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-category.php and that will be used instead.
    get_template_part( 'loop', 'category' );

    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    And the home page template:
    Template Name: Front Page

    //Display the header

    get_header(); ?>

    <div id="container">
    <div id="content" role="main">

    //code to display slideshow
    get_a_post(29); ?>
    <?php the_content(); ?>

    //code to display most recent news article
    while(have_posts()) : the_post(); ?>

    <h2 class="entry-title"><?php the_category(3); ?></h2>
    <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <div class="entry">
    <?php the_excerpt(); ?>

    <?php endwhile; ?>

    $post_id = 134;
    $queried_post = get_post($post_id);
    $content = $queried_post->post_content;
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    echo $content;

    </div><!-- #content -->
    </div><!-- #container -->

    <?php get_sidebar();
    //Display sidebar

    <?php get_footer();
    //Display the footer


  2. Johan van der Wijk
    Plugin Author

    Posted 4 years ago #

    I guess you meant to say that the custom post widget is nog working on your custom wordpress pages?

    I have added a test widget on a category page of a Twenty Ten install and as you can see the widget is being displayed at the bottom of the sidebar: http://wphost.nl/category/uncategorized

    On my company site I use the custom post widget on most pages without any issues: http://www.vanderwijk.com/wordpress/

  3. developdesign
    Posted 4 years ago #

    To clarify for testing. The widget is being used to display an image and hyperlink on the image. On the twentyten and child theme pages, the widget shows the text but the image and hyperlink functionality are gone.

    Are you using any any html/hyperlinks or images in your widgets on either sites you shared? If so, please let me know where.

    I was using widget for the "download corporate presentation" widget at http://www.firststarresources.ca/ , but am using a text widget now because the image and hyperlink stopped showing up on the category and home pages.

  4. Johan van der Wijk
    Plugin Author

    Posted 4 years ago #

    As you can see all the pages on my own site have an image in one of the footer widgets. Here you can see how your image and link work in the widget: http://wphost.nl/

    I would recommend using a tool like firebug to debug your html, as this is clearly not a plugin issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic