Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter manzanofab

    (@manzanofab)

    Hi catacaustic

    Thank you for pointing me out in the right direction, Can i ask you , as i am not sure if this will be the best practice

    After googling for a while, I was able to do a redirect however i couldnt find any examples of how to pass parameters to the redirect, I have added the following code on funcitons.php:

    add_action( ‘init’, ‘example_add_rewrite_rules’ );

    function example_add_rewrite_rules() {
    add_rewrite_rule( ‘([^/]+)/?’, ‘index.php?p=1’, ‘top’ );
    flush_rewrite_rules();
    }

    and then somewhere in the template
    should i do
    //get the URI Somehow as $uriValue

    $wpdb->get_results($wpdb->prepare(“SELECT id,name,extrafield1, extrafield2 from tbl_lp where name=%s”,$uriValue));

    Thanks

    Thread Starter manzanofab

    (@manzanofab)

    Hi catacaustic,
    Thank you for the quick respond, as I am quite new with wp this is not very clear for me. Is this rewrite API add rewrite functions modify the URL? as all the examples that I found online where doing this, and I dont want this.

    If i have someone that goes into website:
    mysite.com/somethinghere
    I need the url to stay the same. This will apply to anything that is typing as somethinghere.

    what i need is to query a particular table and if there is a match bring other information of that particular row of the table.

    as i am trying to recreate the same page hundreds of times without creating the page again and again

    manzanofab

    (@manzanofab)

    its odd but it is not showing on my admin panel
    neither the forms on the site
    could you post a short code sample to test it out
    Thanks

    manzanofab

    (@manzanofab)

    and the short code is???

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