0

I want to use only some part of the widget.

I have multisite network so to link the posts and pages I am using a plugin called Multilingual Press which also comes with widget to switch sites.

Now I have registered a widget area on my header and I want only the part:

ENGLISH FINNISH form the widget, but it is coming with all the divs and title and everything how can I get the only link part from the widget and place is on my desired location.

0

You cannot separate the markup from the output in this widget. The links are built from the result of mlp_show_linked_elements(), so you can use that to create the elements with a custom function or a new widget.

This will print the links to all connected pages:

mlp_show_linked_elements(
    array(
        'link_text'         => 'text',
        'show_current_blog' => TRUE
    )
);

You can add a parameter 'echo' => FALSE to use the result as a value for a variable:

$links = mlp_show_linked_elements(
    array(
        'link_text'         => 'text',
        'show_current_blog' => TRUE,
        'echo'              => FALSE
    )
);
// do something with the links …
echo $links;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.