[resolved] help with (easy?) php mod on sideposts plugin (5 posts)

  1. Skeary
    Posted 7 years ago #

    I'm using the sideposts plug-inbut I want the title instead of displaying text, to be an image.

    So I either need to get the following code (img tag containing php)...

    <img src="<?php bloginfo('template_directory'); ?>/images/title.gif" />

    inside of this code in widgets.php of the sideposts plugin, in order to replace the_title with an image.

    echo ''. get_the_title() .'';

    If there was some way of making the title accept php code, that would also solve the problem, but I am not sure how to do that.

  2. esmi
    Forum Moderator
    Posted 7 years ago #

    You could possibly use CSS to shift the text header off the screen and replace it with a background image.

  3. Skeary
    Posted 7 years ago #

    i think that may be the easiest way to achieve that.. thanks for the pointer! should i just shift it 99999 pixels over to the side or somesuch?

  4. Skeary
    Posted 7 years ago #

    Ok... I have a new major conundrum..
    the titles of sidebar widgets are set in the functions.php

    if ( function_exists('register_sidebars') )
            'before_widget' => '',
        	'after_widget' => '',
     		'before_title' => '<h2>',
            'after_title' => '</h2>',

    I need to set a specific widget h2 with a background in order for this to work, but I can't give it a class without giving all of them a class, unless there's some kind of workaround to change the widget title for one specific widget... any ideas?

  5. Skeary
    Posted 7 years ago #

    I seem to have hacked this away.. not the most elegant solution, but I put the sideposts title as a nbsp; and then put a php code widget above it and set it's bottom margin to negative. The problem is that effects all instances of the php code widget, but if it ends up mattering I might be able to work around that by using a different plug-in for one of the instances (there's 2 php code plugins in the database)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.