Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • I recall reporting this same error to GiveWP sometime back in 2023…it may have made it into a Bug Report over at https://feedback.givewp.com/, but I can’t recall at the moment. Anyway, until they get this fixed, you can add the following to your wp-cli.yml:

    skip-plugins:
    - give-pdf-receipts

    Also, this bug appears to be found in /give-pdf-receipts/src/PdfExport/API/ListExports.php::getSchema(). The schema returned there doesn’t match other valid schema I see output when I run an error_log() inside  /wp-includes/rest-api/class-wp-rest-server.php on line 1566:

    Thread Starter thewebist

    (@thewebist)

    @barryhughes-1 – you wrote:

    We have the tribe_rest_single_event_data1 hook … would that fit your needs (it was only added recently)?

    Haha! As a matter of fact, that was me who submitted that change. Here’s my pull request. I got an answer to my question here from @tirrell on Twitter, and I went ahead and submitted against master. 😉 Thanks!

    • This reply was modified 8 years, 7 months ago by thewebist.

    I’ve been looking for a similar solution. Here’s some food for thought:

    The menu-item-ID corresponds to $wpdb->postmeta.post_id in the WordPress database.

    If you have a menu item which corresponds to a post_type="page" in $wpdb->posts, then you could look up the corresponding menu-item-ID for that page’s menu item by first finding the $wpdb->posts.ID for that page. Then you’d get the menu-item-ID for that page via the following query:

    $wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key="_menu_item_object_id" AND meta_value="'.$post_id.'"' )

    Here’s an example of the above in some code I’m currently working on:

    global $wpdb;
    $main_menu = array( 'Home', 'About', 'Blog', 'Resources', 'Contact' );
    foreach( $main_menu as $post_title ){
    	$post_id = $wpdb->get_var( 'SELECT ID FROM '.$wpdb->posts.' WHERE post_title="'.$post_title.'" AND post_type="page" AND post_status="publish"' );
    	$$post_title = $wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key="_menu_item_object_id" AND meta_value="'.$post_id.'"' );
    }

    The above code results in $Home, $About, etc. being assigned the menu-item-IDs for those pages. Therefore, I’m able to address those menu items via CSS selectors like these:

    li.menu-item-<?php echo $Home ?>{}
    li.menu-item-<?php echo $About ?>{}

    Notes:

    • I’m currently using the above method with a theme which uses only one instance of wp_nav_menu(). I’m guessing you would retrieve multiple menu-item-IDs if you had the same page in multiple occurrences of wp_nav_menu(). Therefore, you’d need to add some logic which would grab the proper menu-item-ID for the menu you want to address via jQuery, CSS, etc.
    • You could improve upon my above code by dynamically generating $main_menu.

    @anemo – I found this thread while I was trying to solve the same problem. However, rather than using jQuery UI Tabs, I’m using the jQuery Tools – Tabs.

    Despite the fact that we’re using different libraries with slightly different HTML/JS/CSS setups, the solution on the WordPress shortcode side of things should help you too. Just change the output to match your needs.

    Example shortcode setup:

    [tabgroup]
    [tab title="Tab 1"]Tab 1 content goes here.[/tab]
    [tab title="Tab 2"]Tab 2 content goes here.[/tab]
    [tab title="Tab 3"]Tab 3 content goes here.[/tab]
    [/tabgroup]

    The Shortcode functions:

    /*
    * jQuery Tools - Tabs shortcode
    */
    add_shortcode( 'tabgroup', 'etdc_tab_group' );
    function etdc_tab_group( $atts, $content ){
    	$GLOBALS['tab_count'] = 0;
    
    	do_shortcode( $content );
    
    	if( is_array( $GLOBALS['tabs'] ) ){
    		foreach( $GLOBALS['tabs'] as $tab ){
    			$tabs[] = '<li><a class="" href="#">'.$tab['title'].'</a></li>';
    			$panes[] = '<div class="pane"><h3>'.$tab['title'].'</h3>'.$tab['content'].'</div>';
    		}
    		$return = "\n".'<!-- the tabs --><ul class="tabs">'.implode( "\n", $tabs ).'</ul>'."\n".'<!-- tab "panes" --><div class="panes">'.implode( "\n", $panes ).'</div>'."\n";
    	}
    	return $return;
    }
    
    add_shortcode( 'tab', 'etdc_tab' );
    function etdc_tab( $atts, $content ){
    	extract(shortcode_atts(array(
    		'title' => 'Tab %d'
    	), $atts));	
    
    	$x = $GLOBALS['tab_count'];
    	$GLOBALS['tabs'][$x] = array( 'title' => sprintf( $title, $GLOBALS['tab_count'] ), 'content' =>  $content );
    
    	$GLOBALS['tab_count']++;
    }

    As you can see, the key in my solution is to store the data for the [tab] shortcode in a global variable. Then, once the recursion is finished there, my [tabgroup] shortcode function generates and returns the necessary HTML by stepping through the global tabgroup array.

    For slightly more details, you can see this post on my blog.

    Hope this helps you out. Cheers!

    This post suggests using the passthrough|PT argument in your RewriteRule; however, this didn’t work in my case. Perhaps it will work in someone else’s?

    e.g. RewriteRule . /index.php [PT,L]

    At this very moment, I’m trying to solve the same problem (i.e. posts and pages are in the database, but they don’t show up on the site nor in “Pages > Pages” or “Posts > Posts”).

    The only change on my server is that mod_mono was installed on my server last night. I’m starting to get some hits on Google searching for mod_mono and mod_rewrite. I’ll post back if I find a solution.

    Forum: Plugins
    In reply to: Better Shopping Cart?

    @torontobroad – I had the same problem trying to get grid view to work. It turns out that the Grid View module calls a function (wpsc_product_url()) that I found in WP e-Commerce 3.6 Beta 8; however, this same function doesn’t exist in the latest stable release (3.5.1).

    I was able to get grid view working in 3.5.1 by grabbing the function from 3.6 Beta 8 and adjusting it for 3.5.1.

    For more details, see this post that I wrote:

    Fixing Grid and List View in WP e-Commerce Gold

    I found the answer to part one of your question by looking at the is_single function in wp-includes/query.php (WP v. 2.2.2).

    To find the current page’s ID, post_title, or post_name:

    $post_obj = $wp_query->get_queried_object();
    $post_ID = $post_obj->ID;
    $post_title = $post_obj->post_title;
    $post_name = $post_obj->post_name;

    For any novices just getting acquainted with the problems associated with pasting directly from MS Word to WordPress, I’ve put together a short screencast which illustrates the problem and then shows how to fix it using the latent advanced editing features in the WordPress WYSIWYG:

    Screencast: WordPress and MS Word

    For any novices who are just getting acquainted with the “pasting from MS Word issue”, I have published a short screencast which demonstrates the problems with pasting directly from MS Word.

    In addition, I also show how to fix this problem by revealing and using the advanced features that come latent in the WordPress WYSIWYG.

    Screencast: WordPress and MS Word

    Ok, almost 11 months after my original tutorial, I’ve posted a new tutorial showing you how to embed WordPress into a default install of OSC MS2.2. Here are links to the tutorial and an example:

    Ok, I’ve got a tutorial posted on Embedding WordPress into OS Commerce.

    Cheers!

    In regards to question 3, I have developed a solution that might suit everyone’s purposes. I’ve integrated a WordPress blog into my client’s OS Commerce install:

    http://www.mywirelesswarehouse.com/blog.php

    If this is in fact what everyone is looking for, I can post a tutorial on how to do this. Keep in mind, that instead of “import[img] my osCommerce template into WordPress”, I am actually embedding a WordPress blog inside of OS Commerce.

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