Wordpress Discussion

  • Started
  • Last post
  • 164 Responses
  • microkorg0

    GETTING YOUTUBE 360 VIDEOS WORKING ON WORDPRESS

    If you've read any of the previous threads you'll have seen that I was having bother with a bought theme. When I was embedding a 360 video (the embed is automatically sniffed when you post url or yt embed in post) in a post.

    What was happening was YT was looking at the size of the iframe the video was in then stripping the screen size down which meant that the 360 feature wasn't working.

    My theme starts with the video smaller then when you click to play it goes larger.

    Way I've got round this after lots of faffing about was to put 4K dimensions into the embed code given by YT and add that into the post.

    e.g

    <iframe width="4096" height="2160" src="https://www.youtube.com/embed/***************" frameborder="0" allowfullscreen></iframe>

    Found that my theme would keep the video sizes that it originally had visually but YT thought it was larger so shows the video at 4K resolution :)

  • microkorg1

    HELP!

    Need some wordpress help here.

    Been trying to embed YouTube 360 content
    e.g


    and it's just not working. Video is playing "unwrapped" with a glitch rectangle top left. Cursor indicates is is a 360 but no.
    :(

    If you've got wordpress please give that link above a demo post if you have a moment to see if it works or if its just my fucking computer :(

    It used to work fine on the test Wordpress install I had.

    Just tried it on 2 different installs and on different browsers and still no.

    Wonder if theres been an update :(

  • SoulFly-3

    Excuse my ignorance, but don't all agencies do that? Resell a 10 dollar WP template for 10K with a new skin?
    I'm sure they don't make it obvious, but I know some web designers in New York that confirmed to me that they do it.

    • Becky, like, I would never.ArmandoEstrada
    • cool story bro.fadein11
    • It's not really THAT difficult to code a theme from scratch. Most commercial themes come with a lot of unnecessary bloat.yuekit
    • this crap again?
      http://www.qbn.com/r…
      sted
    • I'm sure some podunk agencies do, but real agencies have people skilled enough to build from scratch. It's really not as hard as some might think.dbloc
  • dee-dubs0

    Bumping to see if any UK bods have any idea for my question above

    • Drop the url here.sted
    • My best guess was that your js loading queue isn't right,but it looks ok.try to execute the custom script with jquery docready eventsted
    • and load scrollmagic and gsap in the header. your script is ok in the footersted
    • yeah I think I may resort to doing that just to get it workingdee-dubs
  • sted1

    I use these functions on corporate sites:

    http://pastebin.com/cwGinwAw

  • Milan0

    Has anyone ever tried transferring content from a WordPress database to another CMS?

    I've never had to do it, but it looks like it would be an absolute nightmare because of the DB structure.

    • I think the key would be outputting the data into a format (XML or whatever is needed) that could be imported into the other CMS.yuekit
    • ^ yep what he says - you can export all content as XML easily. And there are various other tools for porting data.fadein11
  • fadein110

    Pockets Bump

    • i am so hung over atm. ill look at it laterpockets
    • haha - no probs mate - no panicfadein11
  • fadein110

    @pockets - here is the full function. Thanks again!

    function custom_alsolikequery_shortcode... {

    // Defaults
    extract(shortcode_atts(array(
    "the_query" => ''
    ), $atts));

    // de-funkify query
    $the_query = preg_replace('~&#x0*([0-9a-f... 'chr(hexdec("\\1"))', $the_query);
    $the_query = preg_replace('~&#0*([0-9]+);~e', 'chr(\\1)', $the_query);

    // query is made

    remove_all_filters('posts_orderb...
    query_posts($the_query);

    // Reset and setup variables
    $output = '';
    $temp_title = '';
    $temp_link = '';
    $temp_url = '';

    // the loop

    $exclude = $GLOBALS['current_id'];

    $args = array(

    'post__not_in' => array($exclude), 'post_type'=>'our-work', 'orderby'=>'rand', 'posts_per_page'=>'3'

    );
    query_posts($args);
    if ( have_posts() ) : while ( have_posts() ) : the_post();

    $temp_title = get_the_title($post->ID);
    $temp_link = get_permalink($post->ID);
    $img_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );

    // output all findings - CUSTOMIZE TO YOUR LIKING
    $output .= "<li class='workitem workitem2' style='background:url($img_url); background-repeat: no-repeat!important;
    background-size: cover!important;
    background-position: center center!important;'><a href='$temp_link'><span>$temp_title</span></a></li>

    ";

    endwhile; else:

    $output .= "nothing found.";

    endif;

    wp_reset_query();
    return $output;

    }
    add_shortcode("loopalsolike", "custom_alsolikequery_shortcode...

    • has to be a shortcode as it needs to be inserted into the content here and there.fadein11
    • truncated? wheres the whole thingpockets
    • "..." ?pockets
    • code looks all sorts of fuckedpockets
    • paging fadeinpockets
    • i give uppockets
    • Sorry UK time... That code works fine except excluding the current postfadein11
    • ah yes it is truncated - thought it would be okay as short.fadein11
    • It was 11am and I had to go to bed - thought I had commented that but hadn't - apologies.fadein11
    • 11pm - God I need coffee.fadein11
  • fadein110

    In fact I will kick it off - I need a little advice on a loop:

    I have everything working in this loop except excluding the post that you are viewing the loop on - so this is kind of a related posts loop from a custom post type. Got it all working apart from excluding the current post - random works fine etc.

    Any ideas what I have missed?

    query_posts($the_query);

    // Reset and setup variables
    $output = '';
    $temp_title = '';
    $temp_link = '';
    $temp_url = '';

    // the loop

    $exclude = $GLOBALS['current_id'];

    $args = array(

    'post__not_in' => array($exclude), 'post_type'=>'our-work', 'orderby'=>'rand', 'posts_per_page'=>'3'

    );
    query_posts($args);
    if ( have_posts() ) : while ( have_posts() ) : the_post();

    $temp_title = get_the_title($post->ID);
    $temp_link = get_permalink($post->ID);
    $img_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );

    // output all findings - CUSTOMIZE TO YOUR LIKING
    $output .= "<li class='workitem workitem2' style='background:url($img_url); background-repeat: no-repeat!important;
    background-size: cover!important;
    background-position: center center!important;'><a href='$temp_link'><span>$temp_title</span></a></li>

    • what are you trying to do?pockets
    • All I got is how to exclude the current post from the loop?pockets
    • its a related posts feed on a post page - but basically I want to pull in 3 random posts excluding the 1 you are currently viewing.fadein11
    • is it working but displaying current post on related posts loop?pockets
    • there's one way you can do it off the top of my head, but the post limit would vary, you just need to call the function that can pull the current id of...pockets
    • ..of the random related posts and exclude the current post from it. I'll write you an example, and you replace the missing variablespockets
    • thanks mate!fadein11
  • pockets0

    something like this:

    $current_postID = $post->ID;
    if($randID == $current_postID ){}
    else{
    $temp_title = get_the_title($post->ID);
    $temp_link = get_permalink($post->ID);
    $img_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
    }

    • $randID would be the ID of the related post from the looppockets
    • I just used a dummy variable for you to replace with the actual functionpockets
    • if you send me the actual script so I can test it I can make it workpockets
    • Thank you! have posted below.fadein11
  • oey2

    Me too!

    :)

  • mekk-2

    If an online agency suggests WP for your project they're absolute amateurs in almost every case and resell you a $20 template for $10k, only setting it up and doing minor CSS changes.

    • generaliser is generalising.fadein11
    • As a Wordpress designer/developer myself my experience is the opposite - by far most of my projects are custom Wordpress builds.fadein11
    • what fade said. I deny every project where the client asks to use a $20 template,sted
    • I occasionally use a template if a client has no or little budget and I know it will be superquick but even those generally come out looking v.different.fadein11
    • 100% custom work across the board. We use Zurb as a starting point, so basically a blank canvas.ArmandoEstrada
    • not true at all. we build themes from scratch. it's a great free CMSdbloc
  • cherub1

    **FAIR WARNING**

    I just caught the Gutenburg editor RED HANDED producing non-compliant code. Yesterday I was sitting on the mac at uni, trying to figure out why I kept getting the: "Failed. Could not update post in the database error" I was on day 4 of working nonstop, to the point of no sleep no eating no shower, just to fix this stupid bug. Doing my head in real good. Tech support was no help, said it needed a "deeper investigation to fix."

    Next to me was sitting a student working on his laptop, he's on a business call and talking tech stuff. Then, completely on whim, I am so desperate I'll do anything mind... I decide to ask a complete stranger to help me with my wordpress problem. LOL fml.

    He says he knows java, but never seen or been around wordpress... but he'll take a look. He is intrigued when I reproduce the bug in front of him, and his engineering mind starts going thru possible causes for the bug. I tell him wordpress is based on .php. I show him some code I copied and pasted via the "copy" function on the left hand tree view inside gutenburg. Mind you, this is the exact same code the wp editor will happily DISPLAY but not ALLOW to POST to the DATABASE(UPDATE). He sees the code, and asks me is it html or php. I say "php" but I dunno it looks like .html actually. Then he does something I didn't expect.

    He asks AI to tell us, what language is this code? The AI says it's "gutenburg". There are literally tears forming in my eyes, because I realize he's solved it. He asks the AI: "convert this gutenburg code to html" The AI does it. I go back to wordpress and create a "custom html" block and insert the code. SUCCESS!!! The code was immediately accepted and the website was fixed. I did however find that the 'front page' kept reverting backwards to an older edit, and that problem was caused by having 'sync' turned on in the 'pattern' settings when I was saving the pattern. I turned sync off and the bug disappeared. I don't know why 'sync' is turned on by default to begin with?

    What a nasty introduction to wordpress. My theory is that either:
    -gutenburg was trolling me with bad code
    OR
    -my theme was bugged, so any changes made were producing bad code

    I'll update my post with "lessons learned" but that's enough for now.

    tl;dr - don't use gutenburg editor for wordpress


  • Gabriel0
  • _niko0

    anyone know of a fix for wordpress element fields that don't allow html?

    using a theme that has pre-made team element for example and the text field for the bio won't allow html.

    <p>so it ends up looking </p><br />like this and is annoying as hell<br />end of rant

    not trying to do anything fancy just a paragraph tag or line break or href

    • you have to update field to html text box. easy to do on a static html file but not in wordrpess where that field is likely dynamically generated.hotroddy
    • may be easier to generate a new field in wp's custom fields if proect allows.hotroddy
  • oey0

    Breaking my head to make FlexSlider controlNav buttons to show.
    In flexslider.js controlNav is set to true.

    I can't find the buttons anywhere though.
    I already tried to add them manually but it didn't work.

    Can anyone please check what I'm missing?

    http://patternedcollective.net/b…

    • sorry, but I think I found the way. the file to modify is global.js. and after I enqueued this script the li numbers are finally showing.oey
    • guess it's only css now.oey
    • I feel a bit stupid now...hahaha!oey
  • section_0141

    ^^^

    I don't have any personal experience with it, but I know that Wordpress offers an "API only" functionality. So, instead of having to deal with all their html templating, styling, and all the shit you don't want to deal with on the front end, you can just send http requests to the api and do what you want on the frontend.

  • mg330

    Thanks for the responses to my last question. So, here's another question:

    If you went to a site that was url.com, and had links to url.com/photos, url.com/ux, url.com/music you'd probably assume these were all within the url.com site, and maintained the same visual look and feel.

    But if they were distinctly different, ex: each subfolder is essentially a homepage for that "site" and each of those sites had pages, posts, etc. within, would that be weird?

    That's why I thought using subdomains would be the right way to go, because that perhaps gives a better impression that it's a distinct site. The UX and photo sites would each have their own blog, and on the main url.com domain, these would pull into that page, which would accumulate all blog posts and offer very limited content, and a link to a contact page that serves as the contact page for all the sites.

    Just trying to decide if I'm thinking about this the right way. Every once in a while I get the urge to finally consolidate a couple different sites and I've been checking out multisite in Wordpress, along with a really versatile theme, and thinking about how to go forward.

    • hmm. if the url.com is just a one-page thing then url.com/music and url.com/photos would be fine I think. I'm not a UX or design person thoSquiddy
    • but since photos and music are different, maybe go for different domain names and manage it with Multisite Domain Mapping and stick to subdomain.Squiddy
  • Ranger0

    I've got a problem with a now unsupported plugin but it's the only one I can find that does what I need. It worked fine when the theme used an ID for the header but since a big update the theme now uses a class instead.

    How can I add an ID back into the header div within Wordpress?

    • edit and add what you need in the header.php in the theme directory...(or in the file where your header div is).uan
  • dconstrukt0

    curious if anyone's tried this plugin... looks pretty cool.

    http://csshero.org

    • Looks like it would add a ton of bloat to your site.noneck