Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Go to ajaxify.js and change the code on line 63, as advised above.

    Should do the trick.

    having same issue here

    Thread Starter abtx

    (@abtx)

    Simple solution, without breadcrumbs:

    if($post->post_parent) {
    	$parent_link = get_permalink($post->post_parent); ?>
    <a href="<?php echo $parent_link; ?>">Link to parent page</a>
    <?php }
    Forum: Hacks
    In reply to: HTML5 Video in WordPress
    Thread Starter abtx

    (@abtx)

    ok, I got it. it was this part <?php $video_mp4= the_field( 'background_video_mp4'); $video_ogg = the_field( 'background_video_ogg');?> that outputs url, no need for echo. placing this directly in src attribute renders the video. As most cases, it was a prosaic cause.

    Cheers

    Forum: Hacks
    In reply to: HTML5 Video in WordPress
    Thread Starter abtx

    (@abtx)

    Hi,

    funny enough, this is the template. I’ve developed the theme from scratch, on the second though, I wonder whether I need to register support for HTML5 video in functions.php, but I doubt it. As you say, the html should be rendered just fine, the php should echo the url in src attribute. This is against common sense. There is no explanation why this particular part of html is being ignored other than WordPress seeing it as some illegal, not registered operation, I think.

    Forum: Hacks
    In reply to: HTML5 Video in WordPress
    Thread Starter abtx

    (@abtx)

    it’s in the loop, see below. it’s the correct link to media file, web inspector shows no video tags or source tags, just the plain html url.

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    <div class="slide" data-content="<?php echo get_the_title(); ?>" data-hash="<?php echo get_permalink($post->ID);?>">
    
        <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID ), 'post'); ?>
    
        <div class="img-wrap" style="background-image:url('<?php echo $thumb[0]; ?>')"></div>
    
        <h2>
            <?php echo get_the_title(); ?>
            <span><?php echo get_the_content(); ?></span>
        </h2>
    
        <?php $video_mp4= the_field( 'background_video_mp4'); $video_ogg = the_field( 'background_video_ogg');?>
    
        <video width="100%" height="100%">
    		 	<source src="<?php echo $video_mp4; ?>" type="video/mp4">
    		  <source src="<?php echo $video_ogg; ?>" type="video/ogg">
    		</video>
    
    </div>
    <?php endwhile; endif; ?>

    Thread Starter abtx

    (@abtx)

    Hi James,

    no, I’m not referring to any of these. The requirement is for a custom built app that, as part of its functionality, will allow a user to take photo and upload it to a site that’s hosted in WordPress. I found that XML-RPC WordPress API has libraries both for iOS and Android. Have a look:
    https://github.com/davestitz/XMLRPC-Starter-Kit-for-iOS-Wordpress
    https://code.google.com/p/wordpress-java/
    .

    Thread Starter abtx

    (@abtx)

    I take this pseudocode should look something like this in wp:
    get all categories with custom post type of x
    for each category
    query all posts

    I’m not sure if this is the way to go in WordPress, I take that I have to use foreach to create a slider for each category, and then only I can query all posts in that category. I have problem determining how to use the array in foreach($categories as $category) part, so that I can iterate as one would in JavaScript (ie, for var i etc, and then say some_array[i]). I tried to use -> to get the $category as reference to the array iteration, but no luck. Thanks for willing to help!

    Thread Starter abtx

    (@abtx)

    Thanks for the help Michael, I found the source code related to it and it’s another plugin (I’m picking up on existing project, so was bit off the track with this).

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