Forum Replies Created

Viewing 15 replies - 16 through 30 (of 75 total)
  • Thread Starter Rose

    (@eos-rose)

    My wordpress blog is hosted by someone else and I do not have direct access to the database via phpAdmin or anything like that. Will such a php script still work?

    Thread Starter Rose

    (@eos-rose)

    I’m looking at the number of posts I need to transfer and it’s official: I really need a way to enable csv importing compatibility with Magic Fields.

    Thread Starter Rose

    (@eos-rose)

    If I want the display to work the way I want it, the second loop is probably necessary. No one has suggested an alternative.

    Thread Starter Rose

    (@eos-rose)

    It’s three divs that each take up 33% of the screen. It looks fabulous.

    Thread Starter Rose

    (@eos-rose)

    My markup is essentially like this:

    <div class="col1">
    [featured image post 1]
    [featured image post 4]
    [featured image post 7]
    </div>
    <div class="col2">
    [featured image post 2]
    [featured image post 5]
    [featured image post 8]
    </div>
    <div class="col3">
    [featured image post 3]
    [featured image post 6]
    [featured image post 9]
    </div>

    If I fool around with the CSS so that the three divs do not display as side-by-side columns in mobile view, the posts will still be out of order, which does matter to me.

    Thread Starter Rose

    (@eos-rose)

    The only way I can see to output the text outside the columns is to run the loop twice on the same page. One loop with the three div columns and one with just the text. Won’t that slow down the page load, even if I hide one with CSS?

    Thread Starter Rose

    (@eos-rose)

    But the text would still be in three columns, which I don’t want.

    Thread Starter Rose

    (@eos-rose)

    Thank you! I’m sure this will be very helpful for keeping my site accessible for mobile devices. I should have known the fix would be an easy one.

    Thread Starter Rose

    (@eos-rose)

    Nevermind. I’ve found an alternative way to achieve the desired results. 🙂

    Thread Starter Rose

    (@eos-rose)

    I don’t necessarily need an ordered html list. The two columns are what counts and the link I included indicates that it *is* possible to do what I need without depending on css.

    When I say I don’t want to depend on css, I mean that I don’t want to, for example, do something like adding even/odd classes to <li> and work with a bunch of blocks.

    What I hope to do is have the list split into two divs (as with the code I linked above) and do very simple css to make the columns display side-by-side.

    I perhaps worded my desires poorly. I’m not opposed to using css entirely.

    Thread Starter Rose

    (@eos-rose)

    I found the solution to my second problem as well!

    <?php $terms = get_the_terms( $post->ID , 'series' );
    if($terms) {
    	foreach( $terms as $term ) {
    		if ( $term->description !== '' )  {
    			echo '(' . $term->description . ') ';
    		}
    	}
    }
    ?>

    This will display the term description if a term description exists.

    Thread Starter Rose

    (@eos-rose)

    Obviously I was searching the wrong keywords for my first issue. I found that this will exclude the appropriate titles from the loop:

    if(strpos(get_the_title(), 'Anthology') === false) {
        // Title does not contain Anthology
    }

    If you can think of a better way to do it, I’m still open to suggestions, but for now I’m mostly concerned with how to display the term descriptions. I feel like this is probably something very obvious to people who have used term descriptions before, but I don’t even know where to start in the Codex.

    Thread Starter Rose

    (@eos-rose)

    For those of you interested, I created the following function to display my downloads without a shortcode:

    if(!function_exists('download')){
    	function download(){
    		global $post;
    		global $wpdb;
    		if(get_post_meta($post->ID, 'mp3_id', true)) {
    			$mp3_id = get_post_meta($post->ID, 'mp3_id', true);
    			$format = $wpdb->get_var("SELECT meta_value FROM wp_download_monitor_file_meta WHERE meta_name = 'format' AND download_id = $mp3_id ORDER BY ID DESC LIMIT 0 , 1");
    			$filesize = $wpdb->get_var("SELECT meta_value FROM wp_download_monitor_file_meta WHERE meta_name = 'filesize' AND download_id = $mp3_id ORDER BY ID DESC LIMIT 0 , 1");
    			$duration = $wpdb->get_var("SELECT meta_value FROM wp_download_monitor_file_meta WHERE meta_name = 'duration' AND download_id = $mp3_id ORDER BY ID DESC LIMIT 0 , 1");
    
    			return '<li><a href="http://mywebsite.com/download/' . $mp3_id . '">' . $format . '</a> | <b>Size:</b> ' . $filesize . ' | <b>Duration:</b> ' . $duration . '</li>' . "\n";
    		}
    	}
    }

    This takes the Download ID that I’ve included in the custom fields of various posts and displays the download in my post template wherever I insert <?php echo download(); ?>.

    JournalPress doesn’t spit this code back out at me like it does shortcodes! It’s too bad I can’t determine how to include the assigned permalink as a variable, but I’ve been using id-based links all along, so it works out fine for me. If anyone does figure out how to snag the Download Monitor permalink without shortcodes, please let me know!

    Thread Starter Rose

    (@eos-rose)

    So it seems like JournalPress somehow strips out all shortcodes. I don’t use any other shortcodes, so I can’t verify this. It could be Download Monitor specific, but at this point I doubt it.

    What I need is a way to call up the information from the database using the download ID without using any sort of shortcode. Anyone know how to do this?

    I require the download link, filesize, and two custom meta fields.

    Thread Starter Rose

    (@eos-rose)

    I tried do_shortcode the results were odd. I’m still getting the desired results on single.php (that is, the link is printing as commanded) and my crossposting plugin doesn’t choke, but all that’s crossposted is [download id="681" format="6"] rather than the download link. I feel like maybe I’m getting closer…

    if(!function_exists('dw13')){
    	function dw13(){
    		global $post;
    		if(get_post_meta($post->ID, 'mp3_id', true)) {
    			if (intval(get_post_meta($post->ID, 'mp3_id', true)) > 0) {
    				$mp3_display = get_post_meta($post->ID, 'mp3_id', true);
    				return do_shortcode('[download id="'.$mp3_display.'" format="6"]');
    			}
    		}
    	}
    }
Viewing 15 replies - 16 through 30 (of 75 total)