Feature A Page Widget
[resolved] custom template for a widget (9 posts)

  1. Zied Ellouze
    Posted 2 years ago #

    I want to know if it is possible to create a custom template to display a widget I found this folder "fpw_views" I do not know if I can personalized it
    thank you very much


  2. MRWweb
    Plugin Author

    Posted 2 years ago #

    Hi @zied86.

    You're headed down the right path. Check out "How can I modify the widget design or output?" on the FAQ page. You'll see that there is a safe way to create a new template in your theme using that fpw_views folder.

    However, I would encourage you to try to use CSS or a filter first if possible as those are the most future-friendly ways of modifying the plugin. (I will do my absolute best to make the templating work in the future, but new features will almost certainly require modifying the template.)

    So take a look at that FAQ answer and let me know if you have any other questions.

  3. Zied Ellouze
    Posted 2 years ago #

    thank you for your answer
    I looked for a feature such as this "template file name" in this plugin

  4. MRWweb
    Plugin Author

    Posted 2 years ago #

    Glad to help!

    What are you actually trying to do? Are you saying that the existing templating structure for the plugin isn't working for you?

  5. Zied Ellouze
    Posted 2 years ago #

    I would love to use this plugin
    it is excellent
    my problem that the template HTML site that I'm developing, there are several display example

  6. MRWweb
    Plugin Author

    Posted 2 years ago #

    Is the issue that you need multiple different widget layouts for different pages? Maybe a link or screenshot might help show me the problem?

    Each widget gets a class specific to the page it features, so you can get a long way with CSS or use a conditional statement in the widget layout based on the page id.

  7. Zied Ellouze
    Posted 2 years ago #

    thank you for your follow-up
    Here is an example
    the first 3 pages have the same style
    the 4 th item has a specific display
    same for the 5th item

    Note the picture:
    2-the excpert
    3-read more
    4- featured picture

    Thank you

  8. MRWweb
    Plugin Author

    Posted 2 years ago #

    Ok. Thanks for the details.

    Unfortunately, you're right that right now this plugin does not support multiple templates. You could technically do this in the current single widget layout template with conditionals (pseudo-code), but I wouldn't recommend it as that would be hard to maintain.

    if( in_array( $featured_page_id, array( 12, 47, 93 ) ) {
        /* custom widget layout #1 */
    } elseif( in_array( $featured_page_id, array( 43, 32 ) ) {
        /* custom widget layout #2 */

    I may add more advanced templating at some point in the future, but I'll be honest and tell you that it probably won't be high on the priority list. However, I've added it to the features poll, so make sure to go there and vote for it and any other features you would like.

  9. Zied Ellouze
    Posted 2 years ago #

    Thank you for your follow-up
    I'll try
    In any case, thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Feature A Page Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.