Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



I swear I want to bash my head into a wall. Scribu, author of Posts 2 Posts, has stopped offering any help, paid or otherwise, for this plugin. And now I can't figure out how to get a menu to show every single connected post as a menu. I can get it to show connected items for the page but I just want a global thing.

ie. I have Projects connected to Products along with every Project have a custom taxonomy for a location.

So 2 custom posts and a custom taxonomy.

I need 2 menus, one sorted by location (the submenu for each heading would be a project) and the other menu being sorted by the products and their associated projects. Simple do if I had a basic database and linking ID's but no idea how to get this done in Wordpress and Google is failing me.

Anyone here familiar with Posts 2 Posts? Their documentation seems to mainly support just linking pages to posts.

Adbot
ADBOT LOVES YOU

spiritual bypass
Feb 19, 2008

Grimey Drawer
Are you talking about listing the posts in a template or in the control panel?

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



The templates but I FINALLY got it working after all these hours. Combination of Posts 2 Posts and regular Wordpress linking.

PHP code:
<!-- Side Menu -->
		<div id="side_menu" class="span2">
			<p>MORE PROJECTS</p>
			<p class="menu_header">By Location</p>
			<ul class="unstyled">
			<?php
			$terms = get_terms('location', 'orderby=none&hide_empty');
			foreach ($terms as $term) {
				$wpq = array ('taxonomy'=>'location','term'=>$term->slug);
				$query = new WP_Query ($wpq);
				$article_count = $query->post_count; ?>
					<li class="list_heading"><?= $term->name;?></li>
				<?php if ($article_count) { ?>
					<ul class='list_content'>
				<?php 
					$posts = $query->posts;
					foreach ($posts as $post) { ?>
						<li><a href="<?= get_permalink()?>"><?= $post->post_title?></a></li>
					<?php } ?>
					</ul>
					<?php } } ?>
			</ul>
		<p class="menu_header">By Product</p>
		<ul class="unstyled">
		<?php
		//fetch all custom post types called product
		$args = array('post_type'=>'product', 'post_status'=>'publish', 'posts_per_page'=>'-1', 'order'=>'ASC', 'orderby'=>'title');
		$products = get_posts($args);

		//iterate through each product
		foreach($products as $product) { ?>
			<li class="list_heading"><?= $product->post_title; ?></li>
		<?php 
			//pull related projects
			$connected = get_posts( array(
				'connected_type' => 'projects_to_products',
				'connected_items' => $product,
				'nopaging' => true,
				'suppress_filters'=> false
			));

			//list each project before moving on
			foreach($connected as $project){ ?>
			<ul class='list_content'>
				<li><a href="<?php echo get_permalink($project->ID); ?>"><?= $project->post_title; ?></a></li>
			</ul>
		<?php } } ?>
		</ul>
		</div>
	</div><!-- #primary -->

spiritual bypass
Feb 19, 2008

Grimey Drawer
If you get extraneous output after your Posts2Posts loop, remember to add wp_reset_postdata() after it finishes

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



After thinking things were clear another issue comes up, haha. It seems to move on once it finds a single connected project. The cities work fine and list all associated projects. But the products stop at one. Tried reversing the posts 2 posts thing but it doesn't seem to work.

A project can have many products & a product can be used on many projects. Veird. But progress is progress.


EDIT: Had the drat UL in the 2nd forloop and needed it moved out. :3: Not it lists everything!

Vintersorg fucked around with this message at 17:17 on Jul 29, 2013

poxin
Nov 16, 2003

Why yes... I am full of stars!
Is anyone familiar with using Pods Framework? http://pods.io/ I'm finally getting around to updating an old site to the newest version of the framework but I'm having some small issues with it.

Sleepstupid
Feb 23, 2009
What's the best way/place to find top notch Wordpress development companies? Long story short, we hired a company to redo our site in Wordpress and everything started out absolutely great, but in the last month or so has done a complete 180 and gone to poo poo. I'm hoping I can find someone else who can step in and "get us across the finish line".

Just googling got me where I am now, so I'd like to avoid that. Not to mention it seems as though when someone says they "make" Wordpress sites, that means they can change themes, and when they say they can customize Wordpress that means they can install pluigins :rolleyes:

kedo
Nov 27, 2007

Sleepstupid posted:

I'm hoping I can find someone else who can step in and "get us across the finish line".

Freelancers are going to be your best bet assuming you don't want to start over from scratch. A "top notch Wordpress development" company is not going to want to fix or build on whatever your current developer has delivered, they'd probably want to start from scratch. When a client says they need someone to "get them across the finish line," it immediately throws up a bunch of red flags, and most companies will avoid projects like that because they're always, always terrible.

Sleepstupid posted:

Not to mention it seems as though when someone says they "make" Wordpress sites, that means they can change themes, and when they say they can customize Wordpress that means they can install pluigins

Sounds like you want to look for someone who does custom theme development, if you want another search term to use.

kedo fucked around with this message at 16:49 on Jul 30, 2013

Shadowstar
May 19, 2003

~~~~~~~~~
Look for trustworthy referrals from your personal network. I have a few major clients and then also do a lot of this kind of work for people I know - picking up half-finished projects. Agree that you want a freelancer, not a big shop. Wordpress development isn't really all that complex. You just want someone willing to commit the time who knows what they are doing.

Ned
May 23, 2002

by Hand Knit

Sleepstupid posted:

What's the best way/place to find top notch Wordpress development companies? Long story short, we hired a company to redo our site in Wordpress and everything started out absolutely great, but in the last month or so has done a complete 180 and gone to poo poo. I'm hoping I can find someone else who can step in and "get us across the finish line".

Just googling got me where I am now, so I'd like to avoid that. Not to mention it seems as though when someone says they "make" Wordpress sites, that means they can change themes, and when they say they can customize Wordpress that means they can install pluigins :rolleyes:

I might be able to help you out. Send me a PM.

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Has anyone made a classifieds site in wp? Want to make one but with a custom currency to add a level of pita! The standard classifieds plugins seem poo poo!

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Any idea on logging out of password protected pages? Trying to unset or even destroy the cookie doesn't seem to work at all.

EDIT:

Worked this together from some more searching and it worked. It almost felt like I was fighting with Wordpress to get this to work.

PHP code:
<?php
$home_url = $_POST['home_url'];

// unset cookies
if (isset($_SERVER['HTTP_COOKIE'])) {
    $cookies = explode(';', $_SERVER['HTTP_COOKIE']);
    foreach($cookies as $cookie) {
        $parts = explode('=', $cookie);
        $name = trim($parts[0]);
        setcookie($name, '', time()-1000);
        setcookie($name, '', time()-1000, '/');
    }
}

header('Location: ' . $home_url, false, 302);
exit;
?>

Vintersorg fucked around with this message at 22:04 on Aug 2, 2013

a lovely poster
Aug 5, 2011

by Pipski

Sleepstupid posted:

What's the best way/place to find top notch Wordpress development companies? Long story short, we hired a company to redo our site in Wordpress and everything started out absolutely great, but in the last month or so has done a complete 180 and gone to poo poo. I'm hoping I can find someone else who can step in and "get us across the finish line".

Just googling got me where I am now, so I'd like to avoid that. Not to mention it seems as though when someone says they "make" Wordpress sites, that means they can change themes, and when they say they can customize Wordpress that means they can install pluigins :rolleyes:

Your best bet would be to find a goon developer most likely. I work for a company that does WordPress development and would be more than willing to point you in the right direction if our/my services are too expensive.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Using WP 3.6, I have a custom meta box showing up on Page editors. Hooray! However, it won't save.

I've read the WP docs for the last several hours, followed 43797213123 tutorials which all get at the same thing, and the meta will not save.

PHP code:
add_action('save_post', 'brr_save_fb_app_id_meta');

function brr_save_fb_app_id_meta( $post_ID ) {   
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return $post_ID; 
    } 
    if (isset( $_POST ) ) { 
        $fb_app_id_clean = strip_tags( $_POST['brr_fb_app_id'] );
        // if I die() the script here, I see the post ID and the value I typed in...
        update_post_meta( $post_ID, 'brr_fb_app_id', $fb_app_id_clean );
    } 
}  
I have also done this, which also does not work:
PHP code:
function brndshr_save_fb_app_id_meta( $post_ID ) {   
    global $post;
    if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
        return; 
    } 
    if (isset( $_POST ) ) { 
        $fb_app_id_clean = strip_tags( $_POST['brndshr_fb_app_id'] );
        // if I die() the script here, I see the post ID and the value I typed in...
        update_post_meta( $post->ID, 'brndshr_fb_app_id', $fb_app_id_clean );
    } 
}  
I have tried updating with plain strings, updating on page LOAD... you name it. I am very frustrated as this *should* be easy, right?

RANT / VENT Every time I am forced to do WP dev, I hate this stupid thing even more.


EDIT:

Also, why would this work:

PHP code:
function brr_fb_app_id_meta( $post ) {                                   
    $s = get_post_meta(get_the_ID(), 'brr_fb_app_id', true);
    echo 'If you have a Facebook App Id for this campaign, enter it here:';
?>
    <input type="text" name="brr_fb_app_id" value="<?php echo $s; ?>" /> 
<?php  
 }  
but not this:
PHP code:
function brr_fb_app_id_meta( $post ) {                                   
    $s = get_post_meta($post->ID, 'brr_fb_app_id', true);
    echo 'If you have a Facebook App Id for this campaign, enter it here:';
?>
    <input type="text" name="brr_fb_app_id" value="<?php echo $s; ?>" /> 
<?php  
 }  
$post->ID returns the correct ID, yet that call fails?

Lumpy fucked around with this message at 17:57 on Aug 7, 2013

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Has anyone got any information regarding getting WP to update itself. As in when a script update is available getting it to run the auto installer, not manually logging in and clicking the update now button.

Ned
May 23, 2002

by Hand Knit

Lumpy posted:

WP frustrations

I'm not sure if I can help out here because you seem to know what you are doing but my biggest piece of advice is to think to yourself, "What would WordPress do?"

If the code example uses $post_id instead of $post_ID inside the function then just do $post_id rather than $post_ID. I know it sounds stupid but sometimes it might make it work.

Also, you can do:
code:
$x = update_post_meta( $post_ID, 'brr_fb_app_id', $fb_app_id_clean );
print_r($x);
and see what is happening.

Shadowstar
May 19, 2003

~~~~~~~~~

thegasman2000 posted:

Has anyone got any information regarding getting WP to update itself. As in when a script update is available getting it to run the auto installer, not manually logging in and clicking the update now button.

I think Softalicious will do this. That's probably not very helpful but there you go. Most of my shared hosting accounts have it available.

rugbert
Mar 26, 2003
yea, fuck you

Lumpy posted:

Using WP 3.6, I have a custom meta box showing up on Page editors. Hooray! However, it won't save.

I've read the WP docs for the last several hours, followed 43797213123 tutorials which all get at the same thing, and the meta will not save.


I think wp 3.6 is broken, the theme I've been working on completely stopped saving. Im not doing anything special with it, its just a bunch of form elements but clicking the save button doesn't do anything. Doesn't even refresh the page. It just sits there. I noticed some other standard WP option pages had the same issue but I rolled back to 3.5 immediately and forgot which pages had the issue.

But I also noticed that other people are having saving issues while googling, so I guess its a thing.

rugbert fucked around with this message at 01:53 on Aug 10, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Ned posted:

I'm not sure if I can help out here because you seem to know what you are doing but my biggest piece of advice is to think to yourself, "What would WordPress do?"


Punch me in the nuts as hard as it can?? :v:

Thanks though to you and rugbert for replying. I wound up skipping the whole Meta thing and doing it a different way because it needed to get done "right NOW!!!!", but I hope to revisit it and try to discover what I was doing wrong or if "it's a 3.6 thing".

I guess if I did WP development enough to know how it thinks I would not get so grumpy at it, but spend 95% of my dev time in other languages and frameworks that make WP seem like a strange and alien place.

stoops
Jun 11, 2001
I posted this on the php thread, but since my code actually works in php, I think maybe Wordpress is screwing it up somehow. Any help or point to the right direction is appreciated.

On the code below, I'm getting a Call to undefined function on line 3, "getItems($items)".
I googled and I found that I should be calling it like this "$this->getItems($items);", but that still gives me the same error.

more info: I'm using wp-ecommerce and I have this code in a checkout page.

code:
<?php

$items = $cartquantity;
$packets = array();
getItems($items);


function getItems($items) {

    global $packets;

    $large_packets = 12;
    $medium_packets = 8;
    $small_packets = 4;

    $remainderGetItems = $items % $large_packets;

    if ($remainderGetItems == $items) {
        $remainderGetItems = $items % $medium_packets;
        if ($remainderGetItems == $items) {
            if ($items > 0 && $items <= $small_packets) {
                $packets['small'] = 1;
            } else {
                $packets['medium'] = 1;
            }
        } else {
            $packets['medium'] = ($items - $remainderGetItems) / $medium_packets;
            if ($remainderGetItems != 0) {
                if ($remainderGetItems < $small_packets) {
                    $packets['small'] = 1;
                } else {
					getItems($remainderGetItems);
                }
            }
        }
    } else {
        $packets['large'] = ($items - $remainderGetItems) / $large_packets;
        if ($remainderGetItems != 0) {
            if ($remainderGetItems < $small_packets) {
                $packets['small'] = 1;
            } else {
				getItems($remainderGetItems);
            }
        }
    }
}
?>

Omits-Bagels
Feb 13, 2001
I've come across something odd on my WP site. I installed a plugin called Ad Injector (to help manage my adsense ads) and I discovered a few days later that some of my posts stopped loading. The title and the comments loaded but the content of the post didn't load. It only seemed to effect a few posts. Luckily one of my guests sent me a message or I might have never realized the problem. I disabled the plugin and things seem to be normal again.

Any idea how this could have happened?

Aegis
Apr 28, 2004

The sign kinda says it all.
I looked back a couple pages and didn't see anyone address this so hopefully it's not a recent repeat question. I need a plugin that can make my blog available in other languages. At least European languages but I'd like Arabic and Asian languages too. The suggestion in the OP seems to be dead. I'm new enough at this that I wouldn't know who to trust in the wild west internet.

rugbert
Mar 26, 2003
yea, fuck you
Can anyone recommend a simple e-commerce plugin for listing downloadable products to sell? So something which will help me sell software packages, or plugins, or any sort of downloadable product.

Im not even sure how it would work but Im thinking it would bring customers to a payment gateway, and then upon successful payment, send the customer an email with a hashcode to download the package? I dunno, Ive never really worked on anything e-commerce before.

kedo
Nov 27, 2007

Anyone aware of a plugin and/or a functions.php modification that'll add featured images into an RSS feed? I'm specifically looking for one that'll tag it as <media:content> in RSS, not just appending it to the content like this. I've found that same method half a dozen times now, and it isn't quite what I'm looking for.

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

rugbert posted:

Can anyone recommend a simple e-commerce plugin for listing downloadable products to sell? So something which will help me sell software packages, or plugins, or any sort of downloadable product.

Im not even sure how it would work but Im thinking it would bring customers to a payment gateway, and then upon successful payment, send the customer an email with a hashcode to download the package? I dunno, Ive never really worked on anything e-commerce before.

I'm busy implementing this on a site - it seems to be pretty good so far, and it should do what you want: Easy Digital Downloads.

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.

rugbert posted:

Can anyone recommend a simple e-commerce plugin for listing downloadable products to sell? So something which will help me sell software packages, or plugins, or any sort of downloadable product.

Im not even sure how it would work but Im thinking it would bring customers to a payment gateway, and then upon successful payment, send the customer an email with a hashcode to download the package? I dunno, Ive never really worked on anything e-commerce before.

WooCommerce is pretty simple and powerful, all things considered.

rugbert
Mar 26, 2003
yea, fuck you

RobertKerans posted:

I'm busy implementing this on a site - it seems to be pretty good so far, and it should do what you want: Easy Digital Downloads.

Dude that looks awesome!


Ok next question. Has anyone here rolled out their own theme/plugin update manager? I just found this: http://clark-technet.com/2010/12/wordpress-self-hosted-plugin-update-api but I want to see what other people are doing before I spend a ton of time with it.

Edit - I was thinking about maybe rolling my own that checks an RSS feed on my theme server so see if the latest RSS item <version> ID </version> is newer than installed themes version ID and if so, download and install it.

rugbert fucked around with this message at 13:20 on Aug 26, 2013

Macropiper
Feb 11, 2007

Pillbug

stoops posted:

I posted this on the php thread, but since my code actually works in php, I think maybe Wordpress is screwing it up somehow. Any help or point to the right direction is appreciated.

On the code below, I'm getting a Call to undefined function on line 3, "getItems($items)".
I googled and I found that I should be calling it like this "$this->getItems($items);", but that still gives me the same error.

more info: I'm using wp-ecommerce and I have this code in a checkout page.


Firstly, sorry that you have to work with that plugin, I used to be the main developer on it, leaving the company responsible was one of the best decisions I ever made.

It has been years since I have looked at Wordpress, or WPSC, but from looking at the code in the github repository, try using:
code:
$wpsc_cart->getItems($items);

Frost000
Jan 10, 2004

Does anyone here have an affiliate account with Elegant Themes? I'd like to register with them and so I figured I'd try to split the commission with someone here before I jump in.

Edit: Done and done!

Frost000 fucked around with this message at 18:49 on Aug 30, 2013

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
Anyone else looking for an ET account, feel free: http://j.mp/bZrKrT

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Not sure why but the get_posts random function doesn't seem to be working when I queue up posts. I seem to keep getting the exact same ones.

code:
$projects = get_posts(array(
                    'post_type'=>'project', 
                    'post_status'=>'publish', 
                    'numberposts'=>'8', 
                    'orderby' => 'rand',
                    'meta_key' => 'featured_project', 
                    'meta_compare' => '=', 
                    'meta_value' => 1, 
                    'orderby'=>'post_title'
                    ));
And the order is the exact same as well.


EDIT: gently caress, I had two order bys.

Vintersorg fucked around with this message at 21:53 on Sep 3, 2013

aBagorn
Aug 26, 2004
Ok, so on my first day as a non C# specific web developer I was asked to add a custom field to our company's blog comments section on Wordpress. Actually, we want to replace the "Website" field with a "Company" field. Like a dummy I just changed the label, but I can't find where in the PHP that it's formatting that field to a url and cancelling that (plus I should probably be changing it in the database too)

Googling how to do this has been for naught, but I figured goons could help me out here. Using Wordpress 3.5.2 and PremiumPixels theme, if that helps.

Ned
May 23, 2002

by Hand Knit

aBagorn posted:

Ok, so on my first day as a non C# specific web developer I was asked to add a custom field to our company's blog comments section on Wordpress. Actually, we want to replace the "Website" field with a "Company" field. Like a dummy I just changed the label, but I can't find where in the PHP that it's formatting that field to a url and cancelling that (plus I should probably be changing it in the database too)

Googling how to do this has been for naught, but I figured goons could help me out here. Using Wordpress 3.5.2 and PremiumPixels theme, if that helps.

You don't want to mess with the DB. That is a big no-no in WordPress development.

http://www.inkthemes.com/how-to-easily-customize-wordpress-comment-form/04/

Read this to learn how to modify the form to enter comments.

Then you just need to remove a filter on the area which is showing the URL.

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Is there a way to hide the default edit box for pages? I have the Advanced Custom Fields plugin (this thing is loving amazing) and using the Repeater boxes to fill sections in. I want to hide the regular box so the client can only use these fields to add sections to a page. A quick Google search pulled in stuff like deleting tinyMCE and some older stuff from 2007.

I'll keep looking in hopes there is a function I can add to functions.php.

Stoph
Mar 19, 2006

Give a hug - save a life.

Vintersorg posted:

Is there a way to hide the default edit box for pages? I have the Advanced Custom Fields plugin (this thing is loving amazing) and using the Repeater boxes to fill sections in. I want to hide the regular box so the client can only use these fields to add sections to a page. A quick Google search pulled in stuff like deleting tinyMCE and some older stuff from 2007.

I'll keep looking in hopes there is a function I can add to functions.php.

It's an option when you create the custom fields with ACF. Look around on that page.

Vintersorg
Mar 3, 2004

President of
the Brendan Fraser
Fan Club



Stoph posted:

It's an option when you create the custom fields with ACF. Look around on that page.

gently caress, right at the bottom - im such an idiot. Again, ACF owns so hard - what a great tool! My designer here was like, "I wish we knew of this before - could make more dynamic styles". So much control over the content - I love it.

fuf
Sep 12, 2004

haha
What's a good way of letting someone check a site before it goes live?

I looked at a bunch of "maintenance mode" plugins that let logged in users see the site as normal, but display something else for everyone else. This would be ideal, but the "something else" always seems to be some embarrassing, garish page.

I basically just want the site to look like this:
code:
<html>
coming soon
</html>
unless someone is logged in.

edit: never mind I found a good one. "Dashboard Maintenance Mode" just puts a very basic maintenance.php in /wp-content that gets shown to non-logged in people.

fuf fucked around with this message at 18:01 on Sep 9, 2013

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

This is a weird one. I've inherited an elderly, 5 page WordPress site that desperately needs to be SEO'd and fixed up. One of the first problems I've noticed is that the top left logo link to home has two slashes at the end (e.g. https://www.thing.com//). However, these slashes only show up when on the main home page itself, and not on any of the other content pages. I've checked in General > Settings, and the home/root URLs don't have the slash there (in fact if you try to save slashes there they are automatically removed). I then went into the header code ( header.php > _brand.php ) where the link is built and found this:
code:
<a class="home" href="<?php echo get_settings('home'); ?>/" title="<?php bloginfo('name');?>">blah</a>
So I removed the slash from there as well, but still have a double slash on my logo link. I'm kind of stumped after this, and am going to you guys in the hopes of getting some direction. My current suspects are either:
- .htaccess chicanery (which I highly doubt; this client is not technical)
- some kind of buggery in the 'home' value?

spiritual bypass
Feb 19, 2008

Grimey Drawer
Can you make a diagnostic section on a template and check the output of get_settings('home')?
Is there any cache that ought to be cleared in your browser or the server?

Adbot
ADBOT LOVES YOU

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
Does anyone have any experience with the W3 Total Cache plugin?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply