Seeking help, my head is spinning! On my site, I have the ability to dynamically generate pages and use URL parameters to indicate the database and the registry to retrieve information to display, illustrations, etc.
The page that uses these parameters is a single page, but it has the potential to show thousands of different versions, depending on the records used.
The design is currently: domain.com/details/?ls=00A&ls2=00B
BUT Facebook, does not play ball when sharing such a definite page. Therefore, I need to turn this into a virtual page that is more of this design:
Where parameter 1 is 00A and parameter 2 is 00B
I think this has something to do with changing the rewrite rules or creating endpoints, but since the number of extensions outside the page called "details" can be thousands, that seems to cancel out the point of dynamically generated pages and the self maintenance
How would someone recommend achieving a wildcard extension effect?
It seems to be similar to this post:
Pass and read URL parameters with URL rewrite
However, that publication and other similar ones are more oriented to a "Fixed" extension and I am looking for a wildcard extension that can be read using a custom code (through a short code) on the Details page.
Other posts, like this one: Facebook sharer and URL parameters did not give a viable answer.
I need help.
This is the last one and it still doesn't work. Requesting help:
add_action( 'init', 'DetailsEndPointRules' );
function DetailsEndPointRules( )
add_rewrite_tag("%ls%", '(d+)'); //database record
add_rewrite_tag("%lid%", '(d+)'); //List Id
$tag = '^details/(.+)/?$';
$regex = 'index.php?pagename=details&ls=$matches(1)&lid=$matches(2)';
// add the url parameters to the query variable list
add_filter( 'query_vars', 'DetailsParametersVariables' );
function DetailsParametersVariables( $vars )
$vars() = 'ls';
$vars() = 'lid';