Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter contactaidandelaney

    (@contactaidandelaneygmailcom)

    It seems everything that I need to do is core WordPress functionality. You can create custom taxonomies: categories or tags and as many as you like. See here: https://codex.ww.wp.xz.cn/Taxonomies#Custom_Taxonomies

    Thread Starter contactaidandelaney

    (@contactaidandelaneygmailcom)

    Actually, on closer inspection it appears that what I had done was call the the_post_thumbnail(); rather than put it inside a variable. I amend the code and all is working perfectly. Many thanks alchymyth. For anyone interested this is my completed code:

    function venuebanner() {
    $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail_size' );
    $url = $thumb['0'];
    ?>
    <div id="banner-var" style="background: #333 url(<?=$url?>) no-repeat center top;">
    	<div id="wrap" class="container">
    		<?php myvenue_navbar(); ?>
    	</div> <!--id="wrap" class="container" -->
    </div> <!--banner -->
    
    	<? }
    Thread Starter contactaidandelaney

    (@contactaidandelaneygmailcom)

    Thanks alchymyth!

    That has somewhat fixed my problem, but thrown up its own set of issues. I have amended to code to set the_post_thumbnail inside a variable and I call that variable inside the css:

    function venuebanner() {
    $url = the_post_thumbnail();
    ?>
    <div id="banner-var" style="background: #333 url(<?=$url?>) no-repeat center top;">
    	<div id="wrap" class="container">
    		<?php myvenue_navbar(); ?>
    	</div> <!--id="wrap" class="container" -->
    </div> <!--banner -->

    But it has caused the rest of my CSS to misbehave; the navigation I’m calling: <?php myvenue_navbar(); ?> is acting as if it is not inside the parent div: <div id=”banner-var” >

    You can see the issue here:
    http://www.dinnri.com/wordpress/index.php/brooks-cafe-bar/

Viewing 3 replies - 1 through 3 (of 3 total)