• Resolved pank6119

    (@pank6119)


    https://i.imgur.com/K2atKn4.jpg

    Is it possible to add same custom Excerpt To all Post Changing the default excerpt to Custom

    Maybe A difficult Demand but pls help me to do this I have 3000+ post and can’t change their Excerpt data one by one I want code that can Detect if there is no user(my) defined excerpt Means Blank it should Add something to it else If that’s not possible I want code which universally change all post excerpt to same user defined Given data code Say

    adding this to all excerpt later I will add only name profile name manually ?

    <div class=”online-indicator”> </div> ?? Video Credit Profile ?? ?Video ??Link ??DOWNLOAD VIDEO IN HD #Simvideos

    • This topic was modified 1 year, 9 months ago by pank6119.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @pank6119,

    You can use this function:

    function alternative_text_for_oceanwp_excerpt() {
    	// Render for all posts
    	echo 'My custom text/HTML for OceanWP excerpt.';
    }
    add_filter( 'oceanwp_excerpt', 'alternative_text_for_oceanwp_excerpt', 999 );

    You can add this filter to the function.php on the child theme, then all post excerpts will change to that content.

    Download child theme: https://docs.oceanwp.org/article/90-sample-child-theme

    I hope it helps,
    Best Regards

    Thread Starter pank6119

    (@pank6119)

    hello @skalanter will this code change excerpt of all post with no excerpt value defined by me or it will also change excerpt of post which i have already defined something.

    problem is I didn’t knew that excerpt data can be changed so i never did it Now i Have done for some 200-300 post out of 3000 there are 90% of post with by default excerpt & I want by default excerpt as this but to which i have already changed (Added something) must not change again

    Thread Starter pank6119

    (@pank6119)

    Hello @skalanter Thnks for helping I tried The above code on stag website it changes all post excerpt at once but that is just replacement its not from database nor change in default excerpt. i wanted a code which set user defined excerpt by default to this and if I add or replace excerpt of any post in wordpresss it should replace to that but after using this code excerpt can’t be modified

    Hello @pank6119,

    The solution to achieve it is customization.
    To do this, first, you need to use the child theme. You can copy the meta file from the partials folder in the child theme following the same path and then do necessary changes.

    For more information about that, please follow the steps below:

    By using FTP or cPanel access (if didn’t use the localhost), Go to this directory:
    wp-content\themes\oceanwp\partials
    Find your template which you want to customize and copy that template file(in your case, for example, you need to change the date on the blog page, so you need to use the blog template(s): https://i.postimg.cc/brv9gn9s/image.png).

    Then head over to the same path on the child theme. There isn’t an entry folder as a default on your child theme, so you need to create a new one(one time).

    Example: If you want to change the HTML tags structure in the single blog post featured image for standard post format, all you need in this step is the following:

    1. Head over to your WP root > wp-content > themes > oceanwp > partials> single > media path.
    2. Then, find the “blog-single.php” file and copy this file.
    3. After that, go back to the themes folder (wp root > wp-content > themes) and go to the oceanwp-child-theme-master folder.
    4. Create a new folder with the “partials” name in the child theme.
    5. Go to the /partials/ folder and create a new folder with the “single” name.
    6. Go to the /single/ folder and create a new folder with the “media” name.
    7. Go to the /media/ folder and paste the “blog-single.php” file here.

    * Please check this screenshot: https://i.postimg.cc/sxjYTWyt/image.png.
    * Download child theme: https://docs.oceanwp.org/article/90-sample-child-theme

    Note: It’s working with the /woocommerce/ folder or root of the theme files.

    I hope this helps.
    Best Regards

    Thread Starter pank6119

    (@pank6119)

    hello @skalanter Thnks for Helping & quick response I saw files and entry folder also but I m not an expert and changing Default Fields As a beginner will be quite Difficult for me Going Way Around Let me explain You What I Really Want Is Quick Bulk Edit of excerpt Fields for all my post So I Found A Plugin Name “Custom Bulk/Quick Edit ” This plugin Gives option to Add few more Fields to quick Edit and Bulk Edit Which are not available by default that includes Excerpt Field. Images of plugin for Reference is below https://i.imgur.com/kJX4ZGO.jpg

    https://i.imgur.com/t9OuVy3.jpg

    But This Plugin Is not changing Excerpt Field Data For Bulk Post Maybe Not supported with oceanwp or some code error I don’t know as I m not professional

    This plugin Works For single post in quick edit Perfectly but when I bulk edit and add excerpt Data for all selected post it does nothing all excerpt fields are still blank after execution.

    If U can Help In This than my problem will be solved easily wordpress don’t have any option to bulk edit Excerpt data?

    Hello @pank6119,

    Unfortunately, this feature is not available on OceanWP theme. Please get in touch with your third-party plugin author. Maybe they have a solution that we are not aware of.

    The only solution on OceanWP is customization with PHP code. Or search for another third-party plugin.

    Please note that the bulk action to edit is available in WordPress(you can see it on a fresh installation without any plugin or theme), and it does not have the option to edit the excerpt.

    Best Regards

    Thread Starter pank6119

    (@pank6119)

    hello @skalanter Extremely sorry For Wasting Your Time Actually I needed Some Necessary Changes Of Excerpt of All post But I got On Wrong Track Trying to modify theme Defaults excerpt but that’s was in no mean a good idea At last I found A plugin by Wp Sheet Editor which was “Bulk Edit Post / Products ” With This I edited around 2-3k post Excerpt in nearly 1 hour which has really helped me saving a lot of time Rest I found Yoost Seo setting Post setting where u can set default seo title and description for each post which again saved 50% energy and time.

    Now I Just Need a Small Css Help ?? If u can Pls provide a css code to get a border thin Black between inner background and outer background for posts on homepage

    I m Using Oceanwp theme with Maria Classic Template Using Seprated Layout In Genral setting

    Images To describe What I need

    https://i.imgur.com/zLvn56d.jpg

    Black Border Between White and Grey Background (Black Bordering to white bg)

    https://i.imgur.com/dd3i8mH.jpg

    Hello @pank6119,

    Please put the CSS below in Customizing > Custom CSS/JS > CSS Code:

    .blog #wrap .blog-entry {
        border: 1px #ccc solid !important;
    }

    Please read this link for more information about the CSS/JS code on the customizer: https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website.

    Note: if you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes. Also, remember to click on the regenerate all assets file and data in Elementor > Tools(if you have Elementor).

    I hope that helps.
    Best Regards

    Thread Starter pank6119

    (@pank6119)

    You Are Awesome ???? @skalanter It worked perfectly Thank u Very much marking as resolved

    You’re very welcome. Glad I could help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Is it possible to change Excerpt Of all Posted Post At once via Any Code?’ is closed to new replies.